Thanks to visit codestin.com
Credit goes to github.com

Skip to content

stopNodes still parses numbers #795

@joewestcott

Description

@joewestcott

The output of the following is "number", when according to the documentation it should return a string.

import { XMLParser } from "fast-xml-parser";

const parser = new XMLParser({
	stopNodes: ["*.a"]
});

const text = `<a>6</a>`;

console.log(typeof parser.parse(text).a);

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