Jump to content
  • Advertisement
Sign in to follow this  

Reading an XML File

This topic is 2767 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My XML file contains the following:

<?xml version="1.0" encoding="UTF-8"?>

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?

Share this post

Link to post
Share on other sites
can you use System.Xml.Linq library?

if you can then its simple.

in c# it is
XDocument xdoc = XDocument.Load( uri );
xdoc.Root.Element("tagname"). etc

in C++ i guess it is

System::Xml::Linq::XDocument xdoc = System::Xml::Linq::XDocument->Load(uri);
xdoc->Root->Element("tagname")-> etc

Share this post

Link to post
Share on other sites
It depends on your options. Do you have to do this with your own code. If not there are plenty of XML parsers for C/C++, such as RapidXML and TinyXML that are very simple,fast and easy to integrate.

Edit: Code above is viable as well :)

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!