Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C XML Linux
Hello,
how to load an in xml file in c programming via linux and do some searches on it content ?
thanks for helping Smile | :)
Posted 15-Mar-13 10:13am
Comments
joshrduncan2012 at 15-Mar-13 15:18pm
   
What have you tried? Where are you stuck?
ayat abukhadra at 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 :)
ThePhantomUpvoter at 15-Mar-13 15:34pm
   
Start by learning C.
ayat abukhadra at 15-Mar-13 15:35pm
   
i know c programming :) thanks :)
ThePhantomUpvoter at 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 at 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 :)
ThePhantomUpvoter at 15-Mar-13 15:48pm
   
So I would guess that means that you have not bothered reading the FAQ.
ayat abukhadra at 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 at 15-Mar-13 15:47pm
   
Is there any specific reason to use C, not C++, especially if you have some C# experience?
—SA
ayat abukhadra at 15-Mar-13 15:56pm
   
I have an assignment and its required to be written in c on linux :)
Sergey Alexandrovich Kryukov at 15-Mar-13 16:01pm
   
Sorry for you :-) Are you required to write a parser by yourself?
—SA
ayat abukhadra at 15-Mar-13 16:03pm
   
yes :) can you lead me to where to start :)
Sergey Alexandrovich Kryukov at 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.
—SA
ayat abukhadra at 15-Mar-13 16:11pm
   
ok :)

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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. Smile | :)
 
Good luck,
—SA
  Permalink  
v4
Comments
ayat abukhadra at 15-Mar-13 16:10pm
   
thank you :) I'm grateful :)
Sergey Alexandrovich Kryukov at 15-Mar-13 16:17pm
   
I just added the edit.
Good luck, call again,
—SA
ayat abukhadra at 15-Mar-13 16:23pm
   
i saw it, don't know what to say, thank you :)
Sergey Alexandrovich Kryukov at 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)

  Print Answers RSS
0 OriginalGriff 406
1 Marcin Kozub 225
2 Sergey Alexandrovich Kryukov 205
3 Raul Iloc 170
4 Maciej Los 164
0 OriginalGriff 8,289
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,624
3 Maciej Los 4,989
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 15 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100