Gareth,
I have attached a stripped down set of files having removed most of the non-related code. This small set of files includes a main method which will illustrate the problem. You can run it against the XML file pset-testing.xml (which is an instance of the schema pset.xsd) - all included in the tar file. It works fine with xerces 2.5 but fails under 2.6. Any insight is appreciated.
After building it, to execute simply type:
testDOM -file pset-testing.xml
Let me know if you need more information.
Thanks, Steve
Gareth Reakes wrote:
Hi,
Could you provide us with a small snippet of xml and the code you use to parse the document?
Cheers,
Gareth
Steve Harrington wrote:
Hi,
I had some working code that I was running with xerces 2.5 and when I changed to xerces 2.6, it broke. Did something related to DOMTypeInfo change? Here's the code snippet:
for (unsigned int i = 0; i < paramNodes->getLength(); i++) { DOMNode * paramItem = paramNodes->item(i); if(paramItem->getNodeType() == DOMNode::ELEMENT_NODE) { DOMElement * paramElem = (DOMElement*)paramItem; const DOMTypeInfo * typeInfo = paramElem->getTypeInfo(); const XMLCh* typeName = typeInfo->getName(); // check the type of parameter and instantiate the proper class if(XMLString::equals(typeName, INT_PARAM_TYPE)) { handleIntParam(paramElem); } // etc... }
Under 2.5, this worked fine whereas now it seems that I'm getting nothing for the typeName (from DOMTypeInfo::getName method). I realize it says "experimental and subject to change" on the API documentation - perhaps I've played with fire and am now being burned :-) If there is a better way to get the name of the type then what I'm doing here, I'd be happy to change my code.
Cheers, Steve
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DOMTypeInfo-test.tar.gz
Description: Unix tar archive--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]