I'm using a DOMParser to parse a document, then determine which nodes
are of type "mixed='true' "
The code snippet i'm using is below. The thing that's throwing me off
is that everything seems to come back as "content type='mixed' "
regardless of whether it's XSD had that mixed attribute set to true or
not.
Is there something i'm missing? The nested if blocks that i've got
below seem to pass for everything, so perhaps there's another "and"
that i need to ensure that the node is mixed=true ?
if (_xpathNode != null && _xpathNode.getNodeType() ==
Node.ELEMENT_NODE) {
Element element = (Element) _xpathNode;
ElementPSVI psviElement = (ElementPSVI) element;
XSTypeDefinition def = psviElement.getTypeDefinition();
if (def.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
XSComplexTypeDefinition type = (XSComplexTypeDefinition) def;
if (type.getContentType() ==
XSComplexTypeDefinition.CONTENTTYPE_MIXED
&& type.getParticle().getMaxOccurs() > 0) {
// handle retrieval of mixed content for this node....
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]