Hi Adrien,
At 17.20 04/10/2005 +0200, a\.desentenac wrote:
I parse an XML File using a DOMBuilderImpl and
use a XML Schema to validate it.
Then i would like to get, for any given DOMNode,
the information of the corresponding type.
[..]
so it gives me the names of the types but i don't know how to
get more info (like the values of an enumeration), i've looked
at the SCMPrint example but i can't find a way to get from
what i have to a XSTypeDefinition.
Any help is welcome :)
You can get the enumeration from the
DatatypeValidator object by invoking getEnumString().
If you prefer navigating the XSxxxx type
hierarchy, you should first build the XSModel
object from the grammar by calling
parser->getGrammarResolver()->getXSModel(). After
that, you can get the element declaration by
using XSModel::getElementDeclaration(typeName, typeURI).
Hope this helps,
Alberto
By the way, as a minor problem, i have the same problem as
stated there with my code :
http://www.mail-archive.com/[email protected]/msg14794.html
The DatatypeValidator is null on anonymous simple types, and i
don't know why either.
Regards,
Adrien de Sentenac 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)