Click here to Skip to main content
15,028,652 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to load an in xml file in c programming via linux and do some searches on it content ?
thanks for helping :)
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.
ayat abukhadra 15-Mar-13 15:44pm
i haven't tried any thing yet i've searched tutorials on google and all what i found if including libraries to manipulate data in the xml file and i don't want to use these libraries :) still searching and I'm asking for a guide not for a solution to what i need :)
[no name] 15-Mar-13 15:48pm
So I would guess that means that you have not bothered reading the FAQ.
ayat abukhadra 15-Mar-13 15:51pm
i did :) i already said I'm still searching and kind of stuck in finding another way except adding that library :)
Sergey Alexandrovich Kryukov 15-Mar-13 15:47pm
Is there any specific reason to use C, not C++, especially if you have some C# experience?
ayat abukhadra 15-Mar-13 15:56pm
I have an assignment and its required to be written in c on linux :)
Sergey Alexandrovich Kryukov 15-Mar-13 16:01pm
Sorry for you :-) Are you required to write a parser by yourself?
ayat abukhadra 15-Mar-13 16:03pm
yes :) can you lead me to where to start :)
Sergey Alexandrovich Kryukov 15-Mar-13 16:09pm
You should have started with this statement, to avoid wasting time.
Unfortunately, we all don't have resources for tutoring. This is not the case when you can be directed by one Quick answer.
This is a Quick Questions & Answers forum, please understand it.
I'll add an edit to my answer.
ayat abukhadra 15-Mar-13 16:11pm
ok :)

1 solution

Here are two available XML parsers written in C:[^],[^].

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


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:[^],[^].

This is a very useful resource, as the official XML is formulated poorly:[^].

And you need to learn at least something about parsers. This topic is not so easy. Please see:[^].

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,
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,
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...

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