You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by GitBox <gi...@apache.org> on 2021/12/02 10:37:52 UTC
[GitHub] [incubator-age] afidegnum edited a comment on issue #151: Can you add support for other field types for vertexes?
afidegnum edited a comment 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
```
SqlExcutionError: ("Excution ERR[can't adapt type 'dict'](SELECT * from cypher('text_test', $$ CREATE (t:node {tag: %s, %s} ) RETURN id(t) $$) as (v agtype);)", ProgrammingError("can't adapt type 'dict'"))
^
```
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org