Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   MCAD (http://www.velocityreviews.com/forums/f48-mcad.html)
-   -   Example codes with VB.NET working with XML doc required (http://www.velocityreviews.com/forums/t653770-example-codes-with-vb-net-working-with-xml-doc-required.html)

lonelyplanet 08-25-2005 05:31 PM

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!


Scott Swigart 08-25-2005 08:14 PM

RE: Example codes with VB.NET working with XML doc required
 
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!
>
>


lonelyplanet 08-26-2005 01:27 PM

Re: Example codes with VB.NET working with XML doc required
 
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 ?


Scott Swigart 08-26-2005 05:30 PM

Re: Example codes with VB.NET working with XML doc required
 
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 ?
>
>


lonelyplanet 08-29-2005 06:10 AM

Re: Example codes with VB.NET working with XML doc required
 

Scott Swigart 寫道:

> I sent you an e-mail with a Visual Studio project that will compile.
>


Scott,

Tks for your help but lonelyplanet999@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 lonelyplanet9999@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)


lonelyplanet 08-29-2005 06:11 AM

Re: Example codes with VB.NET working with XML doc required
 

Scott Swigart 寫道:

> I sent you an e-mail with a Visual Studio project that will compile.
>


Scott,

Tks for your help but lonelyplanet999@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 lonelyplanet9999@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)


lonelyplanet 08-29-2005 06:11 AM

Re: Example codes with VB.NET working with XML doc required
 

Scott Swigart 寫道:

> I sent you an e-mail with a Visual Studio project that will compile.
>


Scott,

Tks for your help but lonelyplanet999@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 lonelyplanet9999@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)


lonelyplanet 08-29-2005 06:11 AM

Re: Example codes with VB.NET working with XML doc required
 

Scott Swigart 寫道:

> I sent you an e-mail with a Visual Studio project that will compile.
>


Scott,

Tks for your help but lonelyplanet999@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 lonelyplanet9999@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)


lonelyplanet 08-29-2005 06:12 AM

Re: Example codes with VB.NET working with XML doc required
 

Scott Swigart 寫道:

> I sent you an e-mail with a Visual Studio project that will compile.
>


Scott,

Tks for your help but lonelyplanet999@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 lonelyplanet9999@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)


lonelyplanet 08-29-2005 06:12 AM

Re: Example codes with VB.NET working with XML doc required
 

Scott Swigart 寫道:

> I sent you an e-mail with a Visual Studio project that will compile.
>


Scott,

Tks for your help but lonelyplanet999@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 lonelyplanet9999@yahoo.com again please
(note: it's "9999", 4 "9" after word lonelyplanet) ?

Thank You Very Much :)



All times are GMT. The time now is 03:13 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.