Skip to content

BadgerFish shows whitespaces in nodes #4

@gordillo-ramon

Description

@gordillo-ramon

Hi.

Sometime between 1.2 and 1.3.7 (both versions I have tested), the MappedXMLStreamWriter fixed white-spaces and other blank chars using .trim() for text nodes. However, BadgerFishXMLStreamWriter still shows the issue.

name1 name2

Transforms into:

{"xml":{"$":["\n ","\n ","\n"],"field1":{"$":"name1"},"field2":{"$":"name2"}}}

It is necessary to add the check also in BadgerFishXMLStreamWriter.writeCharacters(String text):

         text = text.trim();
         if (text.length() == 0)
           return;

At the beginning will change the transformation into:

{"xml":{"field1":{"$":"name1"},"field2":{"$":"name2"}}}

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions