Skip to content

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

@hectorgrecco

Description

@hectorgrecco
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions