1

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>
ferjani
  • 89
  • 8

1 Answers1

2

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");
Alex Bishop
  • 473
  • 3
  • 6