Click here to Skip to main content
13,093,245 members (74,844 online)
Rate this:
 
Please Sign up or sign in to vote.
I looked web but didn't found a good solution to create and parse a XML file in visual studio using visual c++.
As i have not used the XML file so don't have much idea.
The one who knows the good link to create and parse the XML file,please share it.
Posted 9-Oct-12 5:02am
Comments
lewax00 9-Oct-12 11:07am
   
For staters it doesn't matter if you use Visual Studio or not, that has no effect on how you would handle an XML file. And what is "Visual C++"? Do you mean native C++, or C++/CLI (C++ with .Net)?
Tarun Batra 9-Oct-12 11:08am
   
c++ with .net sir
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

How hard did you look? It took me less than 30 seconds to find these:
TinyXML[^]
Simple C++ XML Parser[^]
Expat[^]

These are all on the first page of results: C++ XML Parser[^]
  Permalink  
Comments
Tarun Batra 17-Oct-12 2:26am
   
sir my data is like this <datacapturesesstings>
<modulesettings>
<account_id>1
<capture_local_dir>c:\
<capture_log_dir>c:\log
<capture_log_level>debug
<capture_request_interval>2
<capture_connection_interval>2
<smtp_server_name>n1
<smtp_server_port>80
<smtp_email_sender>s1
<smtp_email_sender_password>p1

<machinelist>
<machine>
<machineid>0022
<make>Make1
<model>Model1
<serialnumber>SN1
<ipaddress>10.10.10.10
<Port>80</Port>

<machine>
<machineid>3000
<make>Make3
<model>Model3
<serialnumber>SN3
<ipaddress>30.30.30.30
<Port>80</Port>




I used the code of TinyXML to parse and save the xml,i saw that there are 4 projects in TinyXML,can you please guide me which to use to parse the XML and then write it into the new XML file
Tarun Batra 17-Oct-12 3:30am
   
can you reply to following link http://www.codeproject.com/Questions/478037/QueriesplusregardingplusTinyXMLplusandplusanotherp
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Since you're using .Net, I suggest reading How to: Parse XML with XmlReader[^].
  Permalink  
Comments
Tarun Batra 17-Oct-12 3:30am
   
can you reply to following link http://www.codeproject.com/Questions/478037/QueriesplusregardingplusTinyXMLplusandplusanotherp
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

Why you don't try this ;)
Using MSXML to read XML documents[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 10 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100