473,499 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Example codes with VB.NET working with XML doc required

Hi,

I'm studying for 70-306 using the book "MCAD/MCSD Visual Basic .NET
Windows Applications" published by McGraw Hill (ISBN: 0-07-212583-7).

I found the book has no programming exercise provided about how VB.NET
work with XML documents (certification objective 15.02). I'm now
searching for some example source codes to assist my study.

Could anyone also suggest me some useful online study resources ?

Tks!

Nov 21 '05 #1
19 3063
I recommend starting here:

http://samples.gotdotnet.com/quickst...viewofXML.aspx

This quickstart walks you through the main XML concepts.
"lonelyplanet" wrote:
Hi,

I'm studying for 70-306 using the book "MCAD/MCSD Visual Basic .NET
Windows Applications" published by McGraw Hill (ISBN: 0-07-212583-7).

I found the book has no programming exercise provided about how VB.NET
work with XML documents (certification objective 15.02). I'm now
searching for some example source codes to assist my study.

Could anyone also suggest me some useful online study resources ?

Tks!

Nov 21 '05 #2
Scott Swigart 寫道:
I recommend starting here:

http://samples.gotdotnet.com/quickst...viewofXML.aspx

This quickstart walks you through the main XML concepts.


Tks Scott,

I found one source code at below link showing how to Read XML from a
file.

http://samples.gotdotnet.com/quickst...eadXmlFile.src
From the source code, I expected the .vb file should be compiled as a

console application so I tried to compile it with vbc.exe.

Before calling vbc.exe. I ran below .bat file, too

path "d:\program files\microsoft visual studio .net\frameworksdk\bin";
"d:\windows\microsoft.net\framework\v1.0.3705" %PATH%

However, as I executed below command at DOS prompt, below error
messages was printed out:

================================================== ========

Microsoft (R) Visual Basic .NET Compiler version 7.00.9466
for Microsoft (R) .NET Framework version 1.00.3705
Copyright (C) Microsoft Corporation 1987-2001. All rights reserved.

vbc : error BC30420: 'Sub Main' was not found in 'ReadXmlFileSample'.
D:\VB\XMLDoc\ReadXmlFile.vb(4) : error BC30466: Namespace or type 'Xml'
for the Imports 'System.Xml' cannot be found.

Imports System.Xml
~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(20) : error BC30002: Type 'XmlTextReader'
is not defined.

Dim reader as XmlTextReader = nothing
~~~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(25) : error BC30002: Type 'XmlTextReader'
is not defined.

reader = new XmlTextReader (args)
~~~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(49) : error BC30002: Type 'XmlTextReader'
is not defined.

private shared Sub FormatXml (reader as XmlTextReader, filename as
String)
~~~~~~~~~~~~~

D:\VB\XMLDoc\ReadXmlFile.vb(58) : error BC30451: Name 'XmlNodeType' is
not declared.

case XmlNodeType.XmlDeclaration:
~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(62) : error BC30451: Name 'XmlNodeType' is
not declared.

case XmlNodeType.ProcessingInstruction:
~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(66) : error BC30451: Name 'XmlNodeType' is
not declared.

case XmlNodeType.DocumentType:
~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(70) : error BC30451: Name 'XmlNodeType' is
not declared.

case XmlNodeType.Comment:
~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(74) : error BC30451: Name 'XmlNodeType' is
not declared.

case XmlNodeType.Element:
~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(81) : error BC30451: Name 'XmlNodeType' is
not declared.

case XmlNodeType.Text:
~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(85) : error BC30451: Name 'XmlNodeType' is
not declared.

case XmlNodeType.Whitespace:
~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(106) : error BC30002: Type 'XmlTextReader'
is not defined.

private shared Sub Format(byref reader as XmlTextReader , nodeType
as String)
~~~~~~~~~~~~~


What have I missed ? Do I call vbc correctly ?

Nov 21 '05 #3
I sent you an e-mail with a Visual Studio project that will compile.

"lonelyplanet" wrote:
Scott Swigart 寫道:
I recommend starting here:

http://samples.gotdotnet.com/quickst...viewofXML.aspx

This quickstart walks you through the main XML concepts.


Tks Scott,

I found one source code at below link showing how to Read XML from a
file.

http://samples.gotdotnet.com/quickst...eadXmlFile.src
From the source code, I expected the .vb file should be compiled as a

console application so I tried to compile it with vbc.exe.

Before calling vbc.exe. I ran below .bat file, too

path "d:\program files\microsoft visual studio .net\frameworksdk\bin";
"d:\windows\microsoft.net\framework\v1.0.3705" %PATH%

However, as I executed below command at DOS prompt, below error
messages was printed out:

================================================== ========

Microsoft (R) Visual Basic .NET Compiler version 7.00.9466
for Microsoft (R) .NET Framework version 1.00.3705
Copyright (C) Microsoft Corporation 1987-2001. All rights reserved.

vbc : error BC30420: 'Sub Main' was not found in 'ReadXmlFileSample'.
D:\VB\XMLDoc\ReadXmlFile.vb(4) : error BC30466: Namespace or type 'Xml'
for the Imports 'System.Xml' cannot be found.

Imports System.Xml
~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(20) : error BC30002: Type 'XmlTextReader'
is not defined.

Dim reader as XmlTextReader = nothing
~~~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(25) : error BC30002: Type 'XmlTextReader'
is not defined.

reader = new XmlTextReader (args)
~~~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(49) : error BC30002: Type 'XmlTextReader'
is not defined.

private shared Sub FormatXml (reader as XmlTextReader, filename as
String)
~~~~~~~~~~~~~

D:\VB\XMLDoc\ReadXmlFile.vb(58) : error BC30451: Name 'XmlNodeType' is
not declared.

case XmlNodeType.XmlDeclaration:
~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(62) : error BC30451: Name 'XmlNodeType' is
not declared.

case XmlNodeType.ProcessingInstruction:
~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(66) : error BC30451: Name 'XmlNodeType' is
not declared.

case XmlNodeType.DocumentType:
~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(70) : error BC30451: Name 'XmlNodeType' is
not declared.

case XmlNodeType.Comment:
~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(74) : error BC30451: Name 'XmlNodeType' is
not declared.

case XmlNodeType.Element:
~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(81) : error BC30451: Name 'XmlNodeType' is
not declared.

case XmlNodeType.Text:
~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(85) : error BC30451: Name 'XmlNodeType' is
not declared.

case XmlNodeType.Whitespace:
~~~~~~~~~~~
D:\VB\XMLDoc\ReadXmlFile.vb(106) : error BC30002: Type 'XmlTextReader'
is not defined.

private shared Sub Format(byref reader as XmlTextReader , nodeType
as String)
~~~~~~~~~~~~~
What have I missed ? Do I call vbc correctly ?

Nov 21 '05 #4

Scott Swigart 寫道:
I sent you an e-mail with a Visual Studio project that will compile.


Scott,

Tks for your help but lo*************@my-deja.com is no longer
reachable as I know my-deja.com no longer exists after google.com
appears.

Could you send the e-mail to lo**************@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)

Nov 21 '05 #5

Scott Swigart 寫道:
I sent you an e-mail with a Visual Studio project that will compile.


Scott,

Tks for your help but lo*************@my-deja.com is no longer
reachable as I know my-deja.com no longer exists after google.com
appears.

Could you send the e-mail to lo**************@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)

Nov 21 '05 #6

Scott Swigart 寫道:
I sent you an e-mail with a Visual Studio project that will compile.


Scott,

Tks for your help but lo*************@my-deja.com is no longer
reachable as I know my-deja.com no longer exists after google.com
appears.

Could you send the e-mail to lo**************@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)

Nov 21 '05 #7

Scott Swigart 寫道:
I sent you an e-mail with a Visual Studio project that will compile.


Scott,

Tks for your help but lo*************@my-deja.com is no longer
reachable as I know my-deja.com no longer exists after google.com
appears.

Could you send the e-mail to lo**************@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)

Nov 21 '05 #8

Scott Swigart 寫道:
I sent you an e-mail with a Visual Studio project that will compile.


Scott,

Tks for your help but lo*************@my-deja.com is no longer
reachable as I know my-deja.com no longer exists after google.com
appears.

Could you send the e-mail to lo**************@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)

Nov 21 '05 #9

Scott Swigart 寫道:
I sent you an e-mail with a Visual Studio project that will compile.


Scott,

Tks for your help but lo*************@my-deja.com is no longer
reachable as I know my-deja.com no longer exists after google.com
appears.

Could you send the e-mail to lo**************@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)

Nov 21 '05 #10

Scott Swigart 寫道:
I sent you an e-mail with a Visual Studio project that will compile.


Scott,

Tks for your help but lo*************@my-deja.com is no longer
reachable as I know my-deja.com no longer exists after google.com
appears.

Could you send the e-mail to lo**************@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)

Nov 21 '05 #11

Scott Swigart 寫道:
I sent you an e-mail with a Visual Studio project that will compile.


Scott,

Tks for your help but lo*************@my-deja.com is no longer
reachable as I know my-deja.com no longer exists after google.com
appears.

Could you send the e-mail to lo**************@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)

Nov 21 '05 #12

Scott Swigart 寫道:
I sent you an e-mail with a Visual Studio project that will compile.


Scott,

Tks for your help but lo*************@my-deja.com is no longer
reachable as I know my-deja.com no longer exists after google.com
appears.

Could you send the e-mail to lo**************@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)

Nov 21 '05 #13

Scott Swigart 寫道:
I sent you an e-mail with a Visual Studio project that will compile.


Scott,

Tks for your help but lo*************@my-deja.com is no longer
reachable as I know my-deja.com no longer exists after google.com
appears.

Could you send the e-mail to lo**************@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)

Nov 21 '05 #14

Scott Swigart 寫道:
I sent you an e-mail with a Visual Studio project that will compile.


Scott,

Tks for your help but lo*************@my-deja.com is no longer
reachable as I know my-deja.com no longer exists after google.com
appears.

Could you send the e-mail to lo**************@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)

Nov 21 '05 #15

Scott Swigart 寫道:
I sent you an e-mail with a Visual Studio project that will compile.


Scott,

Tks for your help but lo*************@my-deja.com is no longer
reachable as I know my-deja.com no longer exists after google.com
appears.

Could you send the e-mail to lo**************@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)

Nov 21 '05 #16

Scott Swigart 寫道:
I sent you an e-mail with a Visual Studio project that will compile.


Scott,

Tks for your help but lo*************@my-deja.com is no longer
reachable as I know my-deja.com no longer exists after google.com
appears.

Could you send the e-mail to lo**************@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)

Nov 21 '05 #17

Scott Swigart 寫道:
I sent you an e-mail with a Visual Studio project that will compile.


Scott,

Tks for your help but lo*************@my-deja.com is no longer
reachable as I know my-deja.com no longer exists after google.com
appears.

Could you send the e-mail to lo**************@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)

Nov 21 '05 #18
Sent.

"lonelyplanet" wrote:

Scott Swigart 寫道:
I sent you an e-mail with a Visual Studio project that will compile.


Scott,

Tks for your help but lo*************@my-deja.com is no longer
reachable as I know my-deja.com no longer exists after google.com
appears.

Could you send the e-mail to lo**************@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)

Nov 21 '05 #19

Scott Swigart 寫道:
Sent.


Scott,

I'm sorry to seek your help again. My Visual Studio NET couldn't read
your sent .sln file again. Probably your Studio NET is more updated
than mine --- I clicked on your supplied ConsoleApplication2.exe. An
error message popped up
"D:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\msco rwks.dll could not be
loaded. I checked directory D:\WINDOWS\Microsoft.NET\Framework and
found subdirectory "v1.0.3705" only.

Could I solve the problem on my side ? Is using the same version of
Studio .NET as you the only solution ?

FYI, I'm using Visual Studio .NET enterprise architect Version 2002.

Microsoft Development Environment 2002 Version 7.0.9466
Microsoft .NET Framework 1.0 Version 1.0.3705.

Tks:)

Nov 21 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
9260
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
2
2428
by: Michael | last post by:
I have to do a data migration for a client. The following conversion is required. Task: - MOVEMENT table with 7,000,000 records, each has a location code - Location code has changed; I have a...
23
3170
by: Alberto | last post by:
An OUTSTANDING example of a rebuttal. Worth a glance. Rather long, OBVIOUSLY feel fee to dismiss it entirely if not interested. But this habit of the rebuttals must go to a stop (forgive odd...
16
3916
by: Fao, Sean | last post by:
As far as I can tell, the standard has defined three portable return codes from function main() (0, EXIT_SUCCESS, EXIT_FAILURE). Personally, on all platforms I have worked with, EXIT_SUCCESS is,...
11
2619
by: ajikoe | last post by:
Hello, I used Visual C# Standard Edition. I want to comment my program using xml commentary method, I don't know why if I use value and example tag, it is not working / showed in the html...
6
2310
by: cj | last post by:
Lets just take this example I'm looking at now. I'm looking at the help screen titled .NET Framework Class Library FolderBrowserDialog Class . It gives an example at the bottom that begins with:...
0
23441
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub)...
0
1797
by: minnie | last post by:
An AJAX Simple Example for PHP Article from http://www.joyistar.com Introduction: AJAX WebShop 3 Beta2 supports PHP programming by integrating PHP5 development environment. Here we will give an...
5
13455
by: =?GB2312?B?17/HvyBaaHVvLCBRaWFuZw==?= | last post by:
Hi, I would like to have someone comments on what's the best practice defining error codes in C. Here's what I think: solution A: using enum pros: type safe. better for debug (some debugger...
0
7132
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7009
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7178
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5475
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.