Alberto,
Thanks, that was very helpful. I cut and pasted in the SEnumVal code and I am now traversing the schema info. Now I want to only consider my node of interest, which you have let me know is found with getGrammar(uri).
curNode is the pointer to the DOMNode of interest. In trying to find the namespace URI for this node, I tried this and it failed:
SchemaGrammar *gram = (SchemaGrammar *) parser->
getGrammar(((PSVIElement *) curNode)->getElementDeclaration()->getNamespace());
What would be the correct syntax?
Thanks,
Jim
At 01:22 PM 2/1/2005, you wrote:
Hi Jim,
At 13.13 01/02/2005 -0800, brutocao wrote:Thanks Alberto,
I couldn't seem to find where the GrammarResolver object is located. It was not in the DOMNode object, nor in the DOMPSVITypeInfo object that I got from the DOMNode object. How do I get at it?
You can get it from the parser object that you used to build the DOM tree.
As an example, look at the SEnumVal sample; but, instead of asking for the grammar for the root element (using getRootGrammar), you should ask for the grammar of the type/element you are looking for (using getGrammar(uri))
Alberto
Thanks again,
Jim
At 12:57 PM 2/1/2005, you wrote:Hi Jim,
At 12.49 01/02/2005 -0800, brutocao wrote:Hello,
I have been looking through the xerces mail archives, and still cannot seem to get my code to work. My basic question is: if I am walking the DOM tree using xerces-c++, how can I get at the PSVI information from a DOMNode pointer (which I call curNode in the code samples below)? I found this code to work:
[...]
This method returns you the name of the type, whether is a simple or complex type and so on; at that point you can look at the GrammarResolver object, retrieve the object for that type and walk its inheritance chain.
Or you can install your own PSVIHandler object into the parser and navigate the PSVIElement object that is provided (for this method, have a look at the PSVIWriter sample).
Alberto
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]