Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. how to read xml data from xml file in VB6.0

how to read xml data from xml file in VB6.0

Scheduled Pinned Locked Moved Visual Basic
xmlhelptutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jainiraj
    wrote on last edited by
    #1

    I am reading an xml file.My code is as follow- Dim XmlDoc As New DOMDocument30 Dim nodlst As IXMLDOMNodeList Dim nod As IXMLDOMNode Dim Data As String XmlDoc.async = False 'Loading the XML file on C drive If XmlDoc.Load(TextFilePath.Text) Then Set nodlst = XmlDoc.selectNodes("/Request") Set nod = nodlst(0).selectSingleNode("Responce") Set Data = nod.Text MsgBox Data End If where TextFilePath.Text is the path of the xml file and file structure is as - <Request> <Responce>File Not Found</Responce> </Request> On compiling my code it is giving an error- "User-defined type not defined......" Please how can I rea data from xml file. Thanks in adv..

    L 1 Reply Last reply
    0
    • J jainiraj

      I am reading an xml file.My code is as follow- Dim XmlDoc As New DOMDocument30 Dim nodlst As IXMLDOMNodeList Dim nod As IXMLDOMNode Dim Data As String XmlDoc.async = False 'Loading the XML file on C drive If XmlDoc.Load(TextFilePath.Text) Then Set nodlst = XmlDoc.selectNodes("/Request") Set nod = nodlst(0).selectSingleNode("Responce") Set Data = nod.Text MsgBox Data End If where TextFilePath.Text is the path of the xml file and file structure is as - <Request> <Responce>File Not Found</Responce> </Request> On compiling my code it is giving an error- "User-defined type not defined......" Please how can I rea data from xml file. Thanks in adv..

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      There's a nice example here[^]. Did you remember to include the reference to the Xml-library?

      I are Troll :suss:

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups