How do I avoid converting HTML tags elements into JSON Object during an XML to JSON conversion using X2JS?
-
I am using X2JS for converting XML file into JSON Object. Some XML Tags contains HTML Tags inside it. <xmltag>I am the data <strong>available</strong> for sale now</xmltag> Now I dont want the html tag "strong" to get converted into a JSONĀ Object. When I use the variable "JsonObj.xmltag" it should return I am the data <strong>available</strong> for sale now I need to stop converting the HTML Tags into JSON Obj and allow only non-HTML tags to convert. Please Help me ..
-
Answer:
most probably, the xml snippet you show is not even valid for the xml structure you are using. if you intend to include xml/html into an defined xml document, you should use CDATA segments to clearly seperate content from structure. For example: <xmltag><![CDATA[I am the data <strong>available</strong> for sale now]]></xmltag>
Constantinus van der Kruijs at Quora Visit the source
Related Q & A:
- How do I display limited html content in a webview?Best solution by Stack Overflow
- How can I split an HTML element?Best solution by Stack Overflow
- How do I create an HTML table, in jQuery, with JSON data?Best solution by Stack Overflow
- How do I avoid the friend zone/not be too much of a nice guy?Best solution by psychologytoday.com
- How can I avoid getting tired while I study?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.