Parse attr failed when the attr text has ">"
See original GitHub issueChecklist
- Have you asked your question on Stackoverflow or similar forum?
- Are you running the latest version?
- Have you included sample input, output, error, and expected output?
- Have you checked if you are using correct configuration?
- Did you try online tool?
Input
Code
let xmlStr = '<P><G ch="aaa>"/><G ch="bb"/></P>';
let result = fastXmlParser.parse(xmlStr, {
attrNodeName: '$',
textNodeName: '#text',
attributeNamePrefix: '',
ignoreAttributes: false,
allowBooleanAttributes: true,
trimValues: true
});
console.log(result);
Output
{ P: { G: { '#text': '"/>', '$': [Object], G: [Object] } } }
expected data
{ P: { G: [Object, Object] } } }
Would you like to work on this issue?
- Yes
- No
Bookmark this repository for further updates.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Parse error when attribute value contains -> #250 - GitHub
Parse error occurs when attribute value contains -> . All attributes after this character can not be correctly parsed. They are parsed as...
Read more >XML-Parsing error AttributeError: 'NoneType' object has no ...
Some text. But it only prints the above mentioned error message. Why can I parse the first xml but not the second one...
Read more >Failed to parse XML - Salesforce Developer Community
strReturn is the XML that I try to parse to get the 'DatosBasicos'. ... Looks like you need to escape the < inside...
Read more >WCAG 2.0 Parsing Criterion is a PITA - GitHub Pages
i.e. unintended empty p element with intended text not contained and a mutant attribute <p="" sprouted on the img element. What this requirement...
Read more >XML - Robot Framework
Parsing an XML file, or a string containing XML, into an XML element structure and finding certain elements from it for for further...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Changes are fixed and published. Please use v3.17.0. Please reopen the issue if any concern is left on the same topic.
The problem has been solved. I’ll be publishing the changes soon.