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. XML / XSL
  4. How to read only Nodes in schema ?

How to read only Nodes in schema ?

Scheduled Pinned Locked Moved XML / XSL
xmlquestiondatabasetutorial
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.
  • N Offline
    N Offline
    nileshbahirshet
    wrote on last edited by
    #1

    I have the code of readin gxml file Dim reader As New Xml.XmlTextReader("C:\XMLFile2.xml") Dim s As String = "" While reader.Read() s = s + reader.Name End While Now from above code,the reader reads every single word of the schema.. But I want to read only Nodes and its child node of the schema and store it into s.. How can I read only the element and its child nodes ?

    N 1 Reply Last reply
    0
    • N nileshbahirshet

      I have the code of readin gxml file Dim reader As New Xml.XmlTextReader("C:\XMLFile2.xml") Dim s As String = "" While reader.Read() s = s + reader.Name End While Now from above code,the reader reads every single word of the schema.. But I want to read only Nodes and its child node of the schema and store it into s.. How can I read only the element and its child nodes ?

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Use the ReadElementXXX methods rather than Read(). Better yet, use and XMLDocument or XDoxument in 3.5.


      only two letters away from being an asset

      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