xerces-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Strimple <tstrim...@collectivedata.com>
Subject Re: Retrieve list of valid children based on element name.
Date Wed, 24 Jan 2007 14:29:35 GMT
Boris Kolpackov wrote:
> Hi Timothy,
> I am somewhat confused by your description, but if you managed to get
> a, say, PSVIElement for an element in your instance, then you can get
> to XSTypeDefinition which describes the type that was used to validate
> this element. From XSTypeDefinition you should be able to get the
> complete content model of a type, including elements and attributes.
> hth,
> -boris

I must be missing something then. From what I can tell, the 
XSTypeDefinition only provides functions for retrieving the name and 
namespace of the type. I'm looking at the documentation here, 
http://xml.apache.org/xerces-c/apiDocs/classXSTypeDefinition.html which 
exposes the following functions.

const XMLCh* getName()
const XMLCh* getNamespace()
XSNamespaceItem* getNamespaceItem()

TYPE_CATEGORY getTypeCategory()
XSTypeDefinition* getBaseType()
bool isFinal(short toTest)
short getFinal()
bool getAnonymous()
bool derivedFromType(const XSTypeDefinition *const ancestorType)
bool derivedFrom(const XMLCh *typeNamespace, const XMLCh *name)

None of which seem to be able to do what I need. Could you provide some 
pseudo code for using XXTypeDefinition to get the valid children / 
attributes of the element?


View raw message