[Simple-support] Parsing arbitrary XML
Brought to you by:
niallg
|
From: Richard K. <rk...@gm...> - 2013-04-25 22:06:16
|
I love Simple XML, but I have one requirement that it doesn't seem to
easily support. Buried deep in som XML that Simple XML parses just fine, I
have arbitrarily-deep XML containing <p>s, text, <img> tags and MathML (see
example below). I can't depend on what order any of it will show up in. I
don't need to parse these trees into objects, I just need to get the entire
mess as an intact string and pass it on to a browser. How would I do that?
Thanks,
Rick
--------------------------------------------------------
<p>
Some text
<img src="xxx"/>
some more text
<m:math>
<m:mrow>
<m:mn>4</m:mn>
<m:mfrac>
<m:mn>1</m:mn>
<m:mn>2</m:mn>
</m:mfrac>
</m:mrow>
</m:math>
yet more text
</p>
|