How can libxml2 be used to parse data from XML?

system picture system · Mar 29, 2011 · Viewed 37.6k times · Source

I have looked around at the libxml2 code samples and I am confused on how to piece them all together.

What are the steps needed when using libxml2 to just parse or extract data from an XML file?

I would like to get hold of, and possibly store information for, certain attributes. How is this done?

Answer

Sadique picture Sadique · Mar 29, 2011

I believe you first need to create a Parse tree. Maybe this article can help, look through the section which says How to Parse a Tree with Libxml2.