top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

C code to parse Xml file ?

+3 votes
309 views

I am new for Xml and want to what all functions need to know before writing c code to parse a .xml file ?

posted Apr 22, 2015 by Vikram Singh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Please find the list of commonly used functions of xml library.
1. xmlReadFile function is used to open .xml file. On successful, this function returns pointer of xmlDoc.
2. xmlDocGetRootElement function is used to retrieve root or first element. This function takes pointer of xmlDoc as input parameter. Element is of type xmlNode.
3. Use xmlNode->next to iterate further nodes.

answer Apr 22, 2015 by Neeraj Mishra
Similar Questions
+2 votes

I know basic of python and I have an xml file created from csv which has three attributes "category", "definition" and "definition description". I want to parse through xml file and identify actors, constraints, principal from the text.

However, I am not sure what is the best way to go. Any suggestion?

+2 votes

What are some of the best ways to build XML in C# code?

...