TableOfContents(2)

Acord xml

lxml

We will lxml to load and parse any xml data. You can install it on Debian/Ubuntu Linux using:

aptitude install python-lxml

Load acord xml file File

Load the file using lxml. This will create a doc element that will hold the whole structure of your file

from lxml import etree
doc = etree.parse ( 'PolicyNumberCompCollRequest.xml' )

How to navigate xml

etree.tostring(doc)

Or you can print for human viewing

etree.tostring(doc,pretty_print=True)