Title:
Bug 72023:Having a comment of the format <!--- comment text ---> in an XML file causes xmlParse() to throw an error on parsing the document
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/
Reporter/Name(from Bugbase): Jared Rypka-Hauer / Jared Rypka-Hauer (Jared Rypka-Hauer)
Created: 06/21/2008
Components: Language
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 1
Problem:
Having a comment of the format <!--- comment text ---> in an XML file causes xmlParse() to throw an error on parsing the document.
It's not clear to me why it xmlParse() should care if the comment has an extra - in it since none of my other XML tools do. The third dash should be considered part of the text of the comment and the error should not be thrown.
This is especially troublesome if you wish to use a CFML-style comment in an XML document. CFXML causes this error too, which means that using a CFML-style comment IN A VALID LOCATION WITHIN A CFML DOCUMENT will cause the error to be shown.
Method:
Put this in an XML file and try to parse with xmlParse():
<document>
<!--- this is the document comment --->
<subtag />
</document>
Result:
An error occured while Parsing an XML document.
The string "--" is not permitted within comments.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3035256
External Customer Info:
External Company:
External Customer Name: Jared Rypka-Hauer
External Customer Email: 08C411A143BC38A7992016B6
External Test Config: 06/21/2008
Attachments:
Comments: