Hey,

Sorry, I should have made that clearer. Jesse is completely correct. If you need tips of how to implement then feel free to give me a shout.

Gareth

Jesse Pelton wrote:

Nor does it seem likely that such a change will be made to the official
code. Xerces implements standards, which makes it predictable and
relatively easy to maintain. If such non-standard behavior is a
requirement, I think you'll have to make your own modifications.



-----Original Message-----
From: Gareth Reakes [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 10, 2004 4:51 AM
To: [EMAIL PROTECTED]
Subject: Re: element names


Hi,

I cannot think of a way of doing this without changing the code base.

Gareth

Lei Jiang wrote:



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]






--
Gareth Reakes, Managing Director Parthenon Computing
+44-1865-811184 http://www.parthcomp.com



--------------------------------------------------------------------- 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]





--
Gareth Reakes, Managing Director Parthenon Computing
+44-1865-811184 http://www.parthcomp.com



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to