Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Accessing mixed content in XML

by samtregar (Abbot)
on Aug 09, 2005 at 22:52 UTC ( #482460=note: print w/replies, xml ) Need Help??

in reply to Accessing mixed content in XML

I gather this isn't what you want to hear, but you'll have to escape that HTML to get it into XML. For example:

<argument>&lt;img src="test.jpg"&gt;</argument>

If you don't then you don't have valid XML and no XML parser I've ever seen is going to parse the file successfully.


Replies are listed 'Best First'.
Re^2: Accessing mixed content in XML
by anthski (Scribe) on Aug 09, 2005 at 23:10 UTC

    I'm quite happy to hear that suggestion as it's easily implemented and works perfectly for what I want to do.

    Thanks for your help. Very much appreciated.

Re^2: Accessing mixed content in XML
by Joost (Canon) on Aug 09, 2005 at 23:18 UTC
      Sure, that works fine for the tiny example shown, but it won't work in the arbitrary case. HTML cannot be trivially transformed into XML in many cases.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://482460]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2021-02-26 16:43 GMT
Find Nodes?
    Voting Booth?

    No recent polls found