Example codes with VB.NET working with XML doc required

Discussion in 'MCAD' started by lonelyplanet, Aug 25, 2005.

  1. lonelyplanet

    lonelyplanet Guest

    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, Aug 25, 2005
    #1
    1. Advertising

  2. I recommend starting here:

    http://samples.gotdotnet.com/quickstart/howto/doc/Xml/OverviewofXML.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!
    >
    >
     
    Scott Swigart, Aug 25, 2005
    #2
    1. Advertising

  3. lonelyplanet

    lonelyplanet Guest

    Scott Swigart 寫é“:

    > I recommend starting here:
    >
    > http://samples.gotdotnet.com/quickstart/howto/doc/Xml/OverviewofXML.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/quicks...howto/samples/Xml/ReadXmlFile/ReadXmlFile.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, Aug 26, 2005
    #3
  4. 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/quickstart/howto/doc/Xml/OverviewofXML.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/quicks...howto/samples/Xml/ReadXmlFile/ReadXmlFile.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, Aug 26, 2005
    #4
  5. lonelyplanet

    lonelyplanet Guest

    Scott Swigart 寫é“:

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


    Scott,

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

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

    Thank You Very Much :)
     
    lonelyplanet, Aug 29, 2005
    #5
  6. lonelyplanet

    lonelyplanet Guest

    Scott Swigart 寫é“:

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


    Scott,

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

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

    Thank You Very Much :)
     
    lonelyplanet, Aug 29, 2005
    #6
  7. lonelyplanet

    lonelyplanet Guest

    Scott Swigart 寫é“:

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


    Scott,

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

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

    Thank You Very Much :)
     
    lonelyplanet, Aug 29, 2005
    #7
  8. lonelyplanet

    lonelyplanet Guest

    Scott Swigart 寫é“:

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


    Scott,

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

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

    Thank You Very Much :)
     
    lonelyplanet, Aug 29, 2005
    #8
  9. lonelyplanet

    lonelyplanet Guest

    Scott Swigart 寫é“:

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


    Scott,

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

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

    Thank You Very Much :)
     
    lonelyplanet, Aug 29, 2005
    #9
  10. lonelyplanet

    lonelyplanet Guest

    Scott Swigart 寫é“:

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


    Scott,

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

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

    Thank You Very Much :)
     
    lonelyplanet, Aug 29, 2005
    #10
  11. lonelyplanet

    lonelyplanet Guest

    Scott Swigart 寫é“:

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


    Scott,

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

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

    Thank You Very Much :)
     
    lonelyplanet, Aug 29, 2005
    #11
  12. 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 is no longer
    > reachable as I know my-deja.com no longer exists after google.com
    > appears.
    >
    > Could you send the e-mail to again please
    > (note: it's "9999", 4 "9" after word lonelyplanet) ?
    >
    > Thank You Very Much :)
    >
    >
     
    Scott Swigart, Aug 29, 2005
    #12
  13. lonelyplanet

    lonelyplanet Guest

    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\mscorwks.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:)
     
    lonelyplanet, Aug 30, 2005
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lonelyplanet
    Replies:
    12
    Views:
    4,581
    lonelyplanet
    Aug 30, 2005
  2. *** JB

    XML / RSS Help required

    *** JB, Mar 5, 2004, in forum: Computer Support
    Replies:
    1
    Views:
    422
  3. Watcher of the Skies

    Epson C20UX maintenance reset codes required

    Watcher of the Skies, Sep 2, 2004, in forum: Computer Support
    Replies:
    2
    Views:
    3,126
    Watcher of the Skies
    Sep 6, 2004
  4. hiralcp
    Replies:
    0
    Views:
    3,592
    hiralcp
    Dec 18, 2007
  5. PWB

    .pdf doc to word doc

    PWB, Sep 16, 2008, in forum: Computer Support
    Replies:
    14
    Views:
    1,154
    chuckcar
    Sep 19, 2008
Loading...

Share This Page