Using the Tree API is there a way to get at the default value listed in the XML Schema for an optional attribute that was not included in the xml document? Reading through the libxml2 website it seems this can be done with the xmlreader API (and even then maybe only for DTDs, it is unclear)

example: schema
<xs:element name = "root_element">
   <xs:attribute  name = "prop1" use="optional" default="5">
</xs:element>
=====================
Xml document
<root_element>

xmlNode* node = magic_code_to_get_that_root_node();

xmlChar *myAttribute = xmlGetProp(node, "prop1") <= this wont work, is it possible some other way?

Thank you,

--
David Grohmann
Senior Student Associate
ARL:ESL - S206


_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to