Hi Adrien,
you should get the list of the global element declarations using XSModel::getComponentsByNamespace(ELEMENT_DECLARATION, "namespace of the schema"); those are potential root elements, that you could filter further by removing the ones being a simple type and the ones that appear as children of another global element.

Hope this helps,
Alberto

At 16.03 04/11/2005 +0100, a\.desentenac wrote:
I validate a XML file against a XSD, and when the root node of
the XML is invalid, I'd like to get the possible valid values.
Is that possible without using a parser to parse the XSD as a
XML file and get the children of the schema element ?

For every other element of the XML I get the XSModelGroup from
its parent type definition and find the possible
XSElementDeclarations, but that clearly is not possible for
the root element, since it has no parent !

Thanks, Adrien Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)


Reply via email to