xml-js icon indicating copy to clipboard operation
xml-js copied to clipboard

xml2json Ignore HTML tags inside <descriptions>

Open Kenzo95 opened this issue 5 years ago • 1 comments

XML files that I have to convert at json have certain description preformatted as HTML, I want Ignore conversions of all tags inside <description> tag or just ignore DIV and SPAN and others HTML tags and have a result like "description": "HTML CONTENT". Someone have suggestions?

<description>
		<description>
				<div class='pdbDescContainer'><div class='pdbDescSection'><span class='pdbDescSectionTitle'>Gender:</span><span class='pdbDescSectionText'>Woman</span></div><div class='pdbDescSection'><span class='pdbDescSectionTitle'>Type:</span><span class='pdbDescSectionText'>Sweatshirt</span></div><div class='pdbDescSection'><span class='pdbDescSectionTitle'>Sleeves:</span><span class='pdbDescSectionText'>long</span></div><div class='pdbDescSection'><span class='pdbDescSectionTitle'>Neckline:</span><span class='pdbDescSectionText'>round</span></div><div class='pdbDescSection'><span class='pdbDescSectionTitle'>Material:</span><span class='pdbDescSectionText'><span class='pdbDescSectionList'><span class='pdbDescSectionItem'>cotton 100%</span></span></span></div><div class='pdbDescSection'><span class='pdbDescSectionTitle'>Washing:</span><span class='pdbDescSectionText'><span class='pdbDescSectionList'><span class='pdbDescSectionItem'>wash at 40° C</span></span></span></div><div class='pdbDescSection'><span class='pdbDescSectionTitle'>Model height, cm:</span><span class='pdbDescSectionText'>180</span></div><div class='pdbDescSection'><span class='pdbDescSectionTitle'>Model wears a size:</span><span class='pdbDescSectionText'>S</span></div><div class='pdbDescSection'><span class='pdbDescSectionTitle'>Fit:</span><span class='pdbDescSectionText'>regular</span></div><div class='pdbDescSection'><span class='pdbDescSectionTitle'>Hems:</span><span class='pdbDescSectionText'>ribbed</span></div><div class='pdbDescSection'><span class='pdbDescSectionTitle'>Details:</span><span class='pdbDescSectionText'><span class='pdbDescSectionList'><span class='pdbDescSectionItem'>visible logo</span></span></span></div></div>
		</description>
				<localecode>en_US</localecode>
		</description>
</descriptions>

Kenzo95 avatar Apr 01 '20 15:04 Kenzo95

Hit the same issue today. Find anything?

jimm101 avatar May 26 '21 00:05 jimm101