How to fill tree from xml file

A couple months ago I write a code that it get data from txt file and writes to tree. Now I want to write code that do the same thing but instead of getting data from txt file, I need to do get data from xml file and write to tree. I found a example written by Sergey Linev on root.cern but I couldn’t understand what am I looking in that code. ROOT: tutorials/xml/xmlreadfile.C File Reference
Is there any simple way to do it ?
Thanks in advance

Hi,

You can use tutorial as starting point.
It demonstrates how XML file can be parsed and values from sub-nodes can be extracted.

If you plan to use really large XML files (over 1GB),
you probably need to use SAX interface of libxml2.
See ROOT: tutorials/xml/SAXHandler.C File Reference

Regards,
Sergey