I wrote an XML parser that works great to fit my needs, but I can't retrieve the root attribute nodes no matter what I try!
So far I have the following code that works great to retrieve the child tag values:

    import xml.dom.minidom

    def parse(filename):

        xmlDoc = xml.dom.minidom.parse(filename)

        tag = xmlDoc.getElementsByTagName('date_time')[0].childNodes[0].nodeValue

        return tag

Here is the XML data I'm parsing:

    <?xml version="1.0"?>
    <order type="buy" subtype="limit" orderID="7659">

What I'm trying to get is the value of the attributes of the root order tag (type, subtype, orderID)
Something like:

    node = tag.attributes['type'].value
    print node

>>> buy

Any help would be appreciated, thanks! :D