Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML parse looks good on Online tool, but when using API crashes #648

Open
5 of 6 tasks
hectorgrecco opened this issue Mar 20, 2024 · 2 comments
Open
5 of 6 tasks

Comments

@hectorgrecco
Copy link

  • 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?

Description

When I'm parsing a specific XML using the API, the package crashes and throws the error on the image. But, when I use the online validator, it does not. Whats happening?

Code

const options = {
        numberParseOptions: {
          leadingZeros: true,
          hex: true,
          skipLike: /\+[0-9]{10}/,
        },
        trimValues: true,
        removeNSPrefix: true,
        processEntities: false,
        parseTagValue: true,
      };
    
      const parser = new XMLParser(options);
      return parser.parse(xmlData);

Output

image

expected data

Don't throw an error

Would you like to work on this issue?

  • Yes
  • No
Copy link

We're glad you find this project helpful. We'll try to address this issue ASAP. You can vist https://solothought.com to know recent features. Don't forget to star this repo.

@amitguptagwl
Copy link
Member

How big your file is? Can you post the content here? Can you try to set contents in a string and try? Probably there are some invalid characters in the XML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants