I get the content of my XML according to the XSD structure I've defined
In my program, I add some elements to my list using the PyXB module generate
After a test, it looks to add correctly new element to the sequences of my module instance
Now I would to know if it is possible to write the content of this new structure/elements/sequence in a file ?
So to sum up :
I use CreateFromDocument() to fill the structure
Then I add some elements in the structure
Then I would to write this new content/structure in a file
Is there a WriteToDocument() or toXml() function to write the xml result ?
I didn't find equivalent in the documentation
EDIT: in fact yes, a toXml() but I ve the error message "MyClass has no attribute toXml()"
Thank you in advance
from exercise import Exercise, Flightplan, FlightplanAction
print "ADDING TEST FPL"
fpl.callsign = "TEST"
print exo.toXml() # Get error "Exercise has no attribute toXml"
it was toxml and no toXml
Log in to post a comment.