Closed tidys closed 2 years ago
I'm glad you find this repository helpful. I'll try to address your issue ASAP. You can watch the repo for new changes or star it.
Sorry. Can you please describe in English?
I've updated it and I feel like I can consider adding a self closing tag logic
in version:4.09, i found stopNodes
can fix my problem
https://github.com/NaturalIntelligence/fast-xml-parser/blob/HEAD/docs/v4/2.XMLparseOptions.md#stopnodes
Discussed in https://github.com/NaturalIntelligence/fast-xml-parser/discussions/481
version:4.0.8
The problem with innerHtml br
My xml data comes from innerHTML, like this:
<font size="20">1<br>2<br>3</font>
,br
is not self closing When I try to parse this xml,this will cause the text to be parsed into the br tag The above array of data will be built and the result will be<font size="20">1<br>2</br><br>3</br></font>
This is not the result I was expecting, I looked at the source code, it seems that there is no good way Here's how I've solved it so far, the xml data is first replaced globally as shown belowreplace(/<br>/g, '<br/>');