Trying to parse comments containing '<' or '>' inside the DOCTYPE markup declaration list results in errors. The errors are different depending on whether '<' or '>' was used (or which appears first). This is not an issue if the comment is elsewhere in the file.
### Code and output
1)
```js
const xmlStr = `
<!ELEMENT greeting (#PCDATA)>
]>
Hello, world!
`
const parser = new fxparser.XMLParser();
const output = parser.parse(xmlStr);
Uncaught Error: Invalid XML comment in DOCTYPE
readDocType DocTypeReader.js:82
parseXml OrderedObjParser.js:245
parse XMLParser.js:35
DocTypeReader.js:82:30
Probably not important, but I feel I should note that while the online version still throws errors, the error messages are different. '<' and '>' throw Error: Start tag expected.:1:undefined and Error: char 'E' is not expected.:3:5 respectively.
Description
Trying to parse comments containing '<' or '>' inside the DOCTYPE markup declaration list results in errors. The errors are different depending on whether '<' or '>' was used (or which appears first). This is not an issue if the comment is elsewhere in the file. ### Code and output 1) ```js const xmlStr = `<!ELEMENT greeting (#PCDATA)> ]>
`
const parser = new fxparser.XMLParser(); const output = parser.parse(xmlStr);
Uncaught Error: Invalid DOCTYPE readDocType DocTypeReader.js:73 parseXml OrderedObjParser.js:245 parse XMLParser.js:35 DocTypeReader.js:73:26
out:
Probably not important, but I feel I should note that while the online version still throws errors, the error messages are different. '<' and '>' throw
Error: Start tag expected.:1:undefined
andError: char 'E' is not expected.:3:5
respectively.Would you like to work on this issue?
Bookmark this repository for further updates.