Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i got the Tiny XML code from the link http://sourceforge.net/projects/tinyxml/[^]

And another XML Parsing document link from the link Parsing an XML file in a C/C++ program[^]

What i have to do is,i will get the data as shown below,i will get it as an string and pass it to mine xml document that have to parse it and store it in an xml file then after i have to read the xml document and connect to ip and port given under the machine tag.
To accomplish this task which should i use the TinyXML or the 2nd link that i gave?
Regarding TinyXML,there are 4 projects that are given when we download the code,which one i have to use?

<DataCaptureSesstings>
  <ModuleSettings>
    <account_id>1</account_id>
    <capture_local_dir>c:\</capture_local_dir>
    <capture_log_dir>c:\log</capture_log_dir>
    <capture_log_level>debug</capture_log_level>
    <capture_request_interval>2</capture_request_interval>
    <capture_connection_interval>2</capture_connection_interval>
    <smtp_server_name>n1</smtp_server_name>
    <smtp_server_port>80</smtp_server_port>
    <smtp_email_sender>s1</smtp_email_sender>
    <smtp_email_sender_password>p1</smtp_email_sender_password>
  </ModuleSettings>
  <MachineList>
	  <Machine>
		<MachineId>0022</MachineId>
		<Make>Make1</Make>
		<Model>Model1</Model>
		<SerialNumber>SN1</SerialNumber>
		<IpAddress>10.10.10.10</IpAddress>
		<Port>80</Port>
	  </Machine>
	  <Machine>
		<MachineId>3000</MachineId>
		<Make>Make3</Make>
		<Model>Model3</Model>
		<SerialNumber>SN3</SerialNumber>
		<IpAddress>30.30.30.30</IpAddress>
		<Port>80</Port>
	  </Machine>
	</MachineList>
</DataCaptureSesstings>
Posted

1 solution

It is far from clear what you are trying to do and why, but you seem once again to be trying to learn some new technology by asking questions here. If you need a quick XML parser then take a look at XmlLite[^] from Microsoft. Using XML is not excessively difficult but it does require you to spend some solid study and experiment time.
 
Share this answer
 
Comments
Tarun Batra 17-Oct-12 3:50am    
Sir you are true i am trying to learn new technology,what i have to do is that i will call one method that return a string as shown above i will catch this string in a string variable and pass it to XML writer that will write the string as it is and then read the XML from XML reader and do further processing can you please guide me to do this?
Richard MacCutchan 17-Oct-12 8:58am    
That still does not make any sense. You need to go and study the examples of the XML reader and writer that you decide to use (TinyXml or XmlLite), and learn how to get your data converted into a form that is acceptable to them. You will not learn enough about it by asking questions here.

Tarun Batra 17-Oct-12 5:59am    
can you please reply on this http://www.codeproject.com/Questions/478172/HowplustopluscompareplusBSTRpluswithpluschar

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900