afidegnum commented on issue #151:
URL: https://github.com/apache/incubator-age/issues/151#issuecomment-984501702


   ```
   def node_tree(parentid , element):
       if parentid:
          x = {key:value for (key,value) in element.attrib.items()}
          print(x)
       for child in element.iterchildren():
            node_tree(element, child)
   
   x = dom_tree.getroot()
   node_tree(None, x)
   ```
   returns 
   ```
   {}
   {'charset': 'UTF-8'}
   {}
   {}
   {'class': 'menu'}
   {'class': 'itm'}
   {'class': 'itm'}
   {'class': 'itm'}
   {}
   {'id': 'idone', 'class': 'classone'}
   {}
   {'class': 'listing'}
   {'class': 'item1'}
   {'class': 'item2'}
   {'class': 'item3'}
   {'id': 'innerone'}
   {}
   {'id': 'innertwo'}
   {}
   {'id': 'second', 'class': 'below'}
   {'class': 'inner'}
   {}
   {}
   {}
   ```
   however i have a syntax error 
   
   ```
   SyntaxError: syntax error at or near "'lang: en'"
   LINE 1: ...pher('text_test', $$ CREATE (t:node {tag: 'html', 'lang: en'...
                                                                ^
   ```
   I'm using https://github.com/rhizome-ai/apache-age-python


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to