Hi,
I tried to post this some time ago but it still is not showing - no idea what happened as I am posting online.
Started playing with 2.x and it reading and working with a file seems to be as easy as before.
doc = binderytools.bind_string(doc_header) changed to doc = bindery.parse(doc_header)
or from file:
doc = binderytools.bind_file(file) changed to doc = bindery.parse(file)
doc.x.y.z etc etc
But I haven't found the equivalent for:
element.xml_append(doc.xml_create_element(name, content=value))
Looked at the different wiki pages, but have not found the right one.
Is there some documentation besides what is on the wiki?
Werner
P.S.
Sorry if this shows up twice now.
--
You received this message because you are subscribed to the Google Groups "akara" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akara/-/u7VrpS9foLoJ.
To post to this group, send email to ak...@googlegroups.com.
To unsubscribe from this group, send email to akara+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akara?hl=en.
On 20/04/2012 19:56, Uche Ogbuji wrote:
...
>
> from amara import tree
> new_elem = tree.element(None, name)
> new_elem.xml_append(tree.text(value))
> element.xml_append(new_elem)
>
> Viz: http://xml3k.org/Amara/Tutorial#Creating_a_document_from_scratch
>
> 3 lines instead of 1, but works as well.
no problem as I it is in a method, so only need to do it ones.
Thanks for the tips, will keep going on this tomorrow and most likely
have some more questions.
Werner