Skip to content

XMLBuilder no longer calling tagValueProcessor function #437

@rpastro

Description

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

Starting with fast-xml-parser v4.0.2 the XMLbuilder is no longer calling the tagValueProcessor function.

Code

const { XMLBuilder } = require('fast-xml-parser');
const xmlBuilder = new XMLBuilder({
    processEntities: false,
    tagValueProcessor: (tagName, tagValue) => tagValue.toUpperCase()
});
xmlBuilder.build({ root: { test: 'hello' } });

Output

With fast-xml-parser v4.0.1, the output is as expected:

<root><test>HELLO</test></root>

Starting with fast-xml-parser v4.0.2, the tagValueProcessor function is not being called, so the output is:

<root><test>hello</test></root>

expected data

This is existing functionality which was broken by a minor release. Expect functionality is for tagValueProcessor to be invoked for all tags.

Would you like to work on this issue?

  • Yes
  • No
  • If Needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions