Reputation: 99
here i'm trying to recover the extension value (the AnyType), which is not an element, so the "element.getchild()" and co do not work. Do you have an idea how to fix the problem ? Thanks.
<xsd:extension base="AnyType">
<xsd:attribute name="Critical" type="xsd:boolean" use="required"/>
</xsd:extension>
Upvotes: 1
Views: 123
Reputation: 483
Are you trying to get the value of the base
attribute ("AnyType"
in this case)? Use the Element.getAttributeValue(String)
method:
String baseAttrValue = element.getAttributeValue("base");
Upvotes: 2