NaturalIntelligence / fast-xml-parser

Validate XML, Parse XML and Build XML rapidly without C/C++ based libraries and no callback.
https://naturalintelligence.github.io/fast-xml-parser/
MIT License
2.45k stars 296 forks source link

Remove trailing slash from jPath for self-closing tags #595

Closed m-radzikowski closed 1 year ago

m-radzikowski commented 1 year ago

Purpose / Goal

Fixes #564

The jPath in updateTag() callback for self-closing tags contained a trailing slash (like: root.a/) which was not intended and could lead to errors if you implemented logic based on the jPath and did not take that into account.

I've added removing trailing slash from jPath in the same place where it's removed from tagName.

Type

Please mention the type of PR

coveralls commented 1 year ago

Coverage Status

coverage: 98.24% (+0.004%) from 98.236% when pulling ec4862cebb9ec4abd055bf32a270e9d3ab9a1142 on m-radzikowski:issue-564 into 643816d67b4c8b85ff97ba83e9bf41d23446c963 on NaturalIntelligence:master.

m-radzikowski commented 1 year ago

Hey @amitguptagwl, any chance you could release a new version with this fix?

amitguptagwl commented 1 year ago

Done. Sorry for the delay.