The xml_lib script loads data into a scene by creating a number of transform nodes. The data (both attributes within tags and raw text) contained in the XML file is stored in various custom attributes residing on the various nodes. The transform nodes are basically being used as a way of getting MEL to work in a more object-orientated fashion. For a more thourough description of that approach, have a look at my article on faking object-orientated programming in MEL, available here
The nodes are arranged in a hierarchy to represent the nesting order of tags in the document. Here's an example of a simple XML file and the resulting heirarchy in Maya:
All of the created nodes have a "type" attribute added to them. In this case, there is one with a type of XMLfile, two of type "object", and two of type" subname. "Foo" and "Hello", since they are attributes within the object tag, are stored in attribute of type name (the same as the name of the attribute listed in the tag). "Bar" and "World", on the other hand, are both raw text within a subname tag. As a result, they are stored into the hierarchy in a "data" attribute on the two subname nodes.