Generate XML file from C++


 
Thread Tools Search this Thread
Top Forums Programming Generate XML file from C++
# 1  
Old 08-04-2008
Generate XML file from C++

Hi,

I need to generate an XML file as output for a C++ program.


Immediate idea that came across to me was through fprintf by mentioning all the attribute names/fields in the XML file one by one and inserting the values there which I get from C++ program.

Is there any other better way to do that? If that how?

Thanks in advance.
# 2  
Old 08-04-2008
You can use http://xerces.apache.org/xerces-c thread-safe library to solve your problem.

Best regards,

Iliyan Varshilov

Last edited by ilko_partizan; 08-04-2008 at 08:46 AM..
# 3  
Old 08-04-2008
Or libxml2. This is immensely popular in open source projects and an integral part of typical Linux-based systems.

The XML C parser and toolkit of Gnome
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Splitting a single xml file into multiple xml files

Hi, I'm having a xml file with multiple xml header. so i want to split the file into multiple files. Sample.xml consists multiple headers so how can we split these multiple headers into multiple files in unix. eg : <?xml version="1.0" encoding="UTF-8"?> <ml:individual... (3 Replies)
Discussion started by: Narendra921631
3 Replies

2. Programming

How to write a java program that will parse through an XML file and generate a report?

I'm pretty new to Java and I am trying to write a program that will pick up a file from a windows directory adn parse through the XML file to produce a report that will show a total item count and a total paid amount. Any one have any suggestions? Trying to figure out where to start... (4 Replies)
Discussion started by: risarose87
4 Replies

3. Shell Programming and Scripting

Comparing delta values of one xml file in other xml file

Hi All, I have two xml files. One is having below input <NameValuePair> <name>Daemon</name> <value>tcp:7474</value> </NameValuePair> <NameValuePair> <name>Network</name> <value></value> </NameValuePair> ... (2 Replies)
Discussion started by: sharsour
2 Replies

4. Shell Programming and Scripting

BASH script to parse XML and generate CSV

Hi All, Hope all you are doing good! Need your help. I have an XML file which needs to be converted CSV file. I am not an expert of awk/sed so your help is highly appreciated!! XML file looks like this: <l:event dateTime="2013-03-13 07:15:54.713" layerName="OSB" processName="ABC"... (2 Replies)
Discussion started by: bhaskar_m
2 Replies

5. Shell Programming and Scripting

Help required in Splitting a xml file into multiple and appending it in another .xml file

HI All, I have to split a xml file into multiple xml files and append it in another .xml file. for example below is a sample xml and using shell script i have to split it into three xml files and append all the three xmls in a .xml file. Can some one help plz. eg: <?xml version="1.0"?>... (4 Replies)
Discussion started by: ganesan kulasek
4 Replies

6. Shell Programming and Scripting

How to add the multiple lines of xml tags before a particular xml tag in a file

Hi All, I'm stuck with adding multiple lines(irrespective of line number) to a file before a particular xml tag. Please help me. <A>testing_Location</A> <value>LA</value> <zone>US</zone> <B>Region</B> <value>Russia</value> <zone>Washington</zone> <C>Country</C>... (0 Replies)
Discussion started by: mjavalkar
0 Replies

7. Shell Programming and Scripting

KSH - help needed for creating a script to generate xml file from text file

Dear Members, I have a table in Oracle DB and one of its column name is INFO which has data in text format which we need to fetch in a script and create an xml file of a new table from the input. The contents of a single cell of INFO column is like: Area:app - aam Clean Up Criteria:... (0 Replies)
Discussion started by: Yoodit
0 Replies

8. Shell Programming and Scripting

Generate a XML file from a text file

FILE-1 USER username@foo.com TOOLIN tool-a TOOL2 tool-b TOOL3 tool-c TOOL4 tool-d TOOL5 tool-e USER username_2@foo.com TOOLIN tool-e TOOL2 tool-f TOOL3 tool-c TOOL4 tool-d .... I need to take this file and generate a target XML file - <access> <managed> ... (3 Replies)
Discussion started by: jacki
3 Replies

9. UNIX for Advanced & Expert Users

XML parser to generate Tuxedo UD files

Hi, My requirement is like this. I have an XML file which needs to be converted to Tuxedo UD files(param name and param value). Does anybody have a sample perl xml parser script for this? (0 Replies)
Discussion started by: guruprasadpr
0 Replies

10. UNIX for Dummies Questions & Answers

generate xml from a shell script

Hello! I would like to generate an xml file from the output of various commands generated from within a shell script (some will be in CDATA). At the moment the only solution I have come up with is echoing xml tags around the commands eg. echo "<bitism>" >> outputfile /usr/sbin/prtconf... (1 Reply)
Discussion started by: speedieB
1 Replies
Login or Register to Ask a Question