473,385 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

C function use to read & write an XML file

i am getting following error in my code
help me to slove this issue
$ gcc -Wall -g -I/usr/include/libxml2/libxml -c create_xml.c
In file included from create_xml.c:2:
/usr/include/libxml2/libxml/tree.h:20:31: libxml/xmlversion.h: No such file or directory
/usr/include/libxml2/libxml/tree.h:880:30: libxml/xmlmemory.h: No such file or directory
In file included from create_xml.c:3:
/usr/include/libxml2/libxml/parser.h:12:25: libxml/tree.h: No such file or directory
/usr/include/libxml2/libxml/parser.h:13:26: libxml/valid.h: No such file or directory
/usr/include/libxml2/libxml/parser.h:14:29: libxml/entities.h: No such file or directory
In file included from create_xml.c:3:
/usr/include/libxml2/libxml/parser.h:182: error: parse error before "xmlValidCtxt"
/usr/include/libxml2/libxml/parser.h:182: warning: no semicolon at end of struct or union
/usr/include/libxml2/libxml/parser.h:222: error: parse error before '}' token
/usr/include/libxml2/libxml/parser.h:647:29: libxml/encoding.h: No such file or directory
/usr/include/libxml2/libxml/parser.h:648:26: libxml/xmlIO.h: No such file or directory
/usr/include/libxml2/libxml/parser.h:649:28: libxml/globals.h: No such file or directory
/usr/include/libxml2/libxml/parser.h:763: error: parse error before "xmlCharEncoding"
/usr/include/libxml2/libxml/parser.h:825: error: parse error before "xmlInputReadCallback"
/usr/include/libxml2/libxml/parser.h:832: error: parse error before "xmlCharEncoding"
create_xml.c: In function `main':
create_xml.c:11: error: structure has no member named `root'
create_xml.c:12: error: structure has no member named `root'
create_xml.c:13: error: structure has no member named `root'
create_xml.c:14: error: structure has no member named `root'
create_xml.c:16: error: structure has no member named `root'
Nov 13 '07 #1
3 3528
sicarie
4,677 Expert Mod 4TB
i am getting following error in my code
help me to slove this issue
$ gcc -Wall -g -I/usr/include/libxml2/libxml -c create_xml.c
In file included from create_xml.c:2:
/usr/include/libxml2/libxml/tree.h:20:31: libxml/xmlversion.h: No such file or directory
/usr/include/libxml2/libxml/tree.h:880:30: libxml/xmlmemory.h: No such file or directory
In file included from create_xml.c:3:
/usr/include/libxml2/libxml/parser.h:12:25: libxml/tree.h: No such file or directory
/usr/include/libxml2/libxml/parser.h:13:26: libxml/valid.h: No such file or directory
/usr/include/libxml2/libxml/parser.h:14:29: libxml/entities.h: No such file or directory
/usr/include/libxml2/libxml/parser.h:647:29: libxml/encoding.h: No such file or directory
/usr/include/libxml2/libxml/parser.h:648:26: libxml/xmlIO.h: No such file or directory
/usr/include/libxml2/libxml/parser.h:649:28: libxml/globals.h: No such file or directory
/usr/include/libxml2/libxml/parser.h:763: error: parse error before "xmlCharEncoding"
/usr/include/libxml2/libxml/parser.h:825: error: parse error before "xmlInputReadCallback"
/usr/include/libxml2/libxml/parser.h:832: error: parse error before "xmlCharEncoding"
Looks like it can't find several of the files you attempted to include in your program on your machine.
In file included from create_xml.c:3:
/usr/include/libxml2/libxml/parser.h:182: error: parse error before "xmlValidCtxt"
/usr/include/libxml2/libxml/parser.h:182: warning: no semicolon at end of struct or union
I think the second message is really self-explanatory.
create_xml.c: In function `main':
create_xml.c:11: error: structure has no member named `root'
create_xml.c:12: error: structure has no member named `root'
create_xml.c:13: error: structure has no member named `root'
create_xml.c:14: error: structure has no member named `root'
create_xml.c:16: error: structure has no member named `root'
I'm betting this 'root' object is trying to use some of the libraries above, but it might just be improperly instantiated. Some code would have been helpful there.
Nov 13 '07 #2
sicarie
4,677 Expert Mod 4TB
jinendrashankar-

Please check your Private Messages, accessible through the PMs link on the top right corner of the page.
Nov 14 '07 #3
Hi All,

Check this code its use to read XML data from XML file. try this code in your local system with command

cc create_xml.c -o create_xml -I/usr/include/libxml2 -L/usr/lib -R/usr/lib -lxml2 -lz -lpthread -lm -lsocket -lnsl

its create your EXE create_xml in local then run
./create_xml <file.xml>
Nov 16 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
5
by: Arvind P Rangan | last post by:
Hi, i like to read an existing xml file which has a schema defined to it, and then write or add data to the existing xml file using vb.net/c#. May be this Question has been answered earlier....
4
by: thinktwice | last post by:
i have just made a test project :(win32 console) //file : func.h #ifndef _FUNC_H_ #define _FUNC_H_ void func1() { return; };
6
by: cj | last post by:
I'm receiving an xml formatted string that I pull data from by reading it into an xml document like this: Dim doc As New Xml.XmlDocument doc.LoadXml(respstr) Dim co_name As Xml.XmlNodeList =...
4
by: _Mario.lat | last post by:
Hallo, I have a little question: In the function session_set_save_handler I can pass the name of function which deal with session. In Xoops code I see the use of this function like that: ...
0
by: magicbeans | last post by:
I am trying to create a .bin file of records from a .txt file. Initially the records are stored in a text file and I want to Read from the .txt file and Write to the .bin file. This is the C++...
14
by: Bryan Parkoff | last post by:
Do you know that current C++ Compiler limits to 64KB segments in source code? It is good news that Microsoft Visual C++ 2005 has expanded to 4GB segments in source code. 4GB segment is ideal for...
2
by: Bina | last post by:
hi, I want to read & write a html file which contain the japanese character. Now how i will do it?I can read & write english character . but when i read & write Japanese character from the html...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.