Parsing Column names from MySQL XML export with python
I am trying to parse only the column names in between the ROW tag. How do I do this with lxml and python? The way I am doing it is returning all tags and not just the column names in between the ROW tag



    >     from lxml import etree
    >     from StringIO import StringIO
    >     import MySQLdb
    >     
    >     newXmlFile = "data2.xml"
    >     oldXmlFile = "data1.xml"
    >     
    >     currentTags = []
    >     newTags     = []
    >     
    >     context = etree.iterparse(oldXmlFile)
    >     
    >     
    >     for action, elem in context:
    >        currentTags.append(elem.tag)
    >       
    >      
    >      
    >     print currentTags


Parsing Column names from MySQL XML export with python
===

I am trying to parse only the column names in between the ROW tag. How do I do this with lxml and python? The way I am doing it is returning all tags and not just the column names in between the ROW tag



    >     from lxml import etree
    >     from StringIO import StringIO
    >     import MySQLdb
    >     
    >     newXmlFile = "data2.xml"
    >     oldXmlFile = "data1.xml"
    >     
    >     currentTags = []
    >     newTags     = []
    >     
    >     context = etree.iterparse(oldXmlFile)
    >     
    >     
    >     for action, elem in context:
    >        currentTags.append(elem.tag)
    >       
    >      
    >      
    >     print currentTags

