[xsd-users] How to add data to xml any type of object
Boris Kolpackov
boris at codesynthesis.com
Wed Sep 11 05:57:46 EDT 2013
Hi Albert,
Babinskas, Albert <albert.babinskas at imagingsciences.com> writes:
> I still have the remaining question of how can I add object to this
> xs:any type? 'Wildcard' example shows that you create 'envelope'
> object and then get its DOMDocument. I cannot instantiate my object
> since it requires to pass it DOMElement.
You don't need to pass DOMDocument when creating your object (this
constructor is used internally by XSD for XML parsing). Instead,
your object will have a number of other constructors and one of
them will take an argument for every required attribute and
element (if you don't have any, then it will become the default
constructor). That's also how the 'wildcard' example creates a
new 'binary' object (driver.cxx:124) and adds it to the envelope.
If you are still having trouble instantiating your object, please
show us the relevant XML Schema definitions.
Boris
More information about the xsd-users
mailing list