RSS Feed for This PostCurrent Article

Convert XML to JSON

JsonML (JSON Markup Language) is an application of the JSON (JavaScript Object Notation) data-interchange format. The purpose of JsonML is to provide a compact format for transporting XML-based data via JSON.

E.g.

<ul>
<li style="color:red">First Item</li>
<li title="Some hover text." style="color:green">
Second Item
</li>
<li><span class="code-example-third">Third</span>
Item</li>
</ul>

is converted to

["ul",
["li",
{ "style" : "color:red" },
"First Item"
],
["li",
{
"title" : "Some hover text.",
"style" : "color:green"
},
"Second Item"
],
["li",
["span",
{ "class" : "code-example-third" },
"Third"
],
" Item"
]
]

Popularity: 1% [?]


Trackback URL


RSS Feed for This PostPost a Comment