Hi everyone, I have a rather silly question:
Is there a workround if I want to be able to use numbers as element names? I'm writing a WebDAV client libray, which uses Xerces-C to parse XML response from different servers. Some days ago someone wrote me and complained that my library kept raising DOM exceptions while he was trying to connect to a MS Exchange2000 server. It turned out that Exchange2000 is using some element names like "0x001a". It is obviously a violation to XML specification. But since Xerces-C is quite a big library, I think chances are there might be a way to live with this MS reality. I use XercesDOMParser as my parser so I checked the documentation. But to my dissapointment, there is no such method in Grammar to bypass name check. And the exception turned out to be raised from DOMDocumentImpl::isXMLName() which in turn calls XMLChar1_0::isValidName(), nothing related to Grammar. Here is a stack trace showing where and how the exception is raised: #0 xercesc_2_6::DOMElementNSImpl::setName (this=0x8935698, namespaceURI=0x8948100, qualifiedName=0x8948640) at DOMElementNSImpl.cpp:228 #1 0x00bbcb8f in DOMElementNSImpl (this=0x8935698, ownerDoc=0x8934ad8, namespaceURI=0x8948100, qualifiedName=0x8948640) at DOMElementNSImpl.cpp:46 #2 0x00bae943 in xercesc_2_6::DOMDocumentImpl::createElementNS (this=0x8934ad8, fNamespaceURI=0x8948100, qualifiedName=0x8948640) at DOMDocumentImpl.cpp:571 #3 0x00b675d2 in xercesc_2_6::AbstractDOMParser::createElementNSNode (this=0x892cb00, namespaceURI=0x8948100, qualifiedName=0x8948640) at AbstractDOMParser.cpp:1124 #4 0x00b6695f in xercesc_2_6::AbstractDOMParser::startElement (this=0x892cb00, [EMAIL PROTECTED], urlId=7, elemPrefix=0x892fc88, [EMAIL PROTECTED], attrCount=0, isEmpty=false, isRoot=false) at AbstractDOMParser.cpp:897 #5 0x00c1150f in xercesc_2_6::IGXMLScanner::scanStartTagNS (this=0x892d978, [EMAIL PROTECTED]) at IGXMLScanner.cpp:2745 #6 0x00c0d525 in xercesc_2_6::IGXMLScanner::scanContent (this=0x892d978) at IGXMLScanner.cpp:886 #7 0x00c0b956 in xercesc_2_6::IGXMLScanner::scanDocument (this=0x892d978, [EMAIL PROTECTED]) at IGXMLScanner.cpp:204 #8 0x00cc7581 in xercesc_2_6::XMLScanner::scanDocument (this=0x892d978, systemId=0x8933688) at XMLScanner.cpp:412 #9 0x00cc7623 in xercesc_2_6::XMLScanner::scanDocument (this=0x892d978, systemId=0x80544a3 "./ill.xml") at XMLScanner.cpp:420 #10 0x00b65610 in xercesc_2_6::AbstractDOMParser::parse (this=0x892cb00, systemId=0x80544a3 "./ill.xml") at AbstractDOMParser.cpp:510 Can anyone tell me if it's possible? Any clue or hint? Thanks a lot. Lei --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]