Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
how to load an in xml file in c programming via linux and do some searches on it content ?
thanks for helping :)
Posted
Comments
joshrduncan2012 15-Mar-13 15:18pm    
What have you tried? Where are you stuck?
ayat abukhadra 15-Mar-13 15:30pm    
i dont wanna install any libraries, i've tried this on C# on windows but i'm trying to do the same on linux and i don't know where to start, any guide line would be amazing :)
[no name] 15-Mar-13 15:34pm    
Start by learning C.
ayat abukhadra 15-Mar-13 15:35pm    
i know c programming :) thanks :)
[no name] 15-Mar-13 15:41pm    
I do not see a single bit of C code in your question that demonstrates what you have tried to do for yourself or demonstrates any kind of a problem.

1 solution

Here are two available XML parsers written in C:
http://www.jclark.com/xml/expat.html[^],
http://www.xmlsoft.org/[^].

Such parsers are unusual. Usually, XML parsers are developed using more advanced languages; C seems impractical.

[EDIT]

OK, finally you told me that you are required to write a parser. Unfortunately, we don't have resource for tutoring, and writing parsers can hardly be explained in the format of the forum.

First, you need to know the XML standard very well:
http://en.wikipedia.org/wiki/XML[^],
http://www.w3.org/XML/[^].

This is a very useful resource, as the official XML is formulated poorly: http://www.xml.com/axml/testaxml.htm[^].

And you need to learn at least something about parsers. This topic is not so easy. Please see:
http://en.wikipedia.org/wiki/Parsing[^].

Please see all the references from this Wiki page.

And finally, you will need a lot of patience. Parsing in general is a pretty difficult topic, XML is, by far, not as simple as it seems, and C is very difficult and error prone, not adequate at all for solving such problems. On the bright side, if you do this work well, you can get tremendous experience, both positive and negative. :-)

Good luck,
—SA
 
Share this answer
 
v4
Comments
ayat abukhadra 15-Mar-13 16:10pm    
thank you :) I'm grateful :)
Sergey Alexandrovich Kryukov 15-Mar-13 16:17pm    
I just added the edit.
Good luck, call again,
—SA
ayat abukhadra 15-Mar-13 16:23pm    
i saw it, don't know what to say, thank you :)
Sergey Alexandrovich Kryukov 15-Mar-13 16:25pm    
You are welcome. You appreciation is quite enough :-)
Wish you good luck in such a difficult work...
—SA

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