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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Reading an XML file

Reading an XML file

Scheduled Pinned Locked Moved Managed C++/CLI
c++xmltutorialquestion
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.
  • T Offline
    T Offline
    T RATHA KRISHNAN
    wrote on last edited by
    #1

    Hi! My XML file contains the following:

    I've to read from the program(C++/CLI), the value of the tag <Updated_date> which is inside the tag <Updateexe>. How to do this in C++/CLI?

    J 1 Reply Last reply
    0
    • T T RATHA KRISHNAN

      Hi! My XML file contains the following:

      I've to read from the program(C++/CLI), the value of the tag <Updated_date> which is inside the tag <Updateexe>. How to do this in C++/CLI?

      J Offline
      J Offline
      John Schroedl
      wrote on last edited by
      #2

      Use XPathNavigator to select the node(s) you're interested in. Example:

      XPathDocument^ document = gcnew XPathDocument("C:\\\\temp\\\\test.xml");
      XPathNavigator^ navigator = document->CreateNavigator();
      
      XPathNodeIterator^ nodes = navigator->Select("\*/Updateexe/Updated\_date");
      while (nodes->MoveNext())
      {
      	Console::WriteLine(nodes->Current->ToString());
      }
      

      John

      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