question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parse attr failed when the attr text has ">"

See original GitHub issue

Checklist

  • 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

image

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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
amitguptagwlcommented, May 18, 2020

Changes are fixed and published. Please use v3.17.0. Please reopen the issue if any concern is left on the same topic.

1reaction
amitguptagwlcommented, Jul 14, 2019

The problem has been solved. I’ll be publishing the changes soon.

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found