Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^2: binary data in XML (semantics)

by sailortailorson (Scribe)
on Feb 28, 2008 at 19:32 UTC ( #670991=note: print w/replies, xml ) Need Help??

in reply to Re: binary data in XML (semantics)
in thread binary data in XML

Perhaps I am crazy, but I am merely asking about a practice that is already in place where I have just started a new job.

Perhaps you mean "they" are crazy. Actually, I might be able to agree with that statement, but it would be out of the scope of any engineering approach to answering this question. Perhaps, by 'you are ... crazy', you simply mean 'not me' (from your point of view, of course). If, by 'you' you simply mean "someone other than myself", then OK, that's, well, odd, and random, but we can go on with part of this discussion that actually addresses the real problem.

Anyway, will I still be crazy (by your definition) if I gather the following from what you say?

To wit:

That the practice in place here of using binary data inline in XML is unusual and deprecated or at least that my new coworkers have probably implemented a system that offends Tim Bray.

That it is not likely remedied by use of <![CDATA...>.

That in effect, hex encoding is the only way to use XML::Twig.


that maybe I ought to use HTML::TreeBuilder::XPath, or some other such library that does not kill itself when it sees XML that does not strictly conform to the standard?

Replies are listed 'Best First'.
Re^3: binary data in XML (semantics)
by mirod (Canon) on Feb 28, 2008 at 19:58 UTC

    HTML::TreeBuilder::XPath might be what you're looking for. Be aware of 2 things though: it loads the entire document in memory. Then its XML export method (as_XML, inherited from HTML::TreeBuilder) does not care about encoding at all, so it might very well produce non-well-formed XML. Which is probably what you want, come to think about it.

      Thanks Mirod.

      Thanks for the XML tools you wrote/improved too. They have made my life orders of magnitude easier (especially being able to use XPath where I was working just before now - I got to see my kids and wife more often and for longer. )

      I am no expert in XML (you can probably tell), but I have been able to find my way along.

      Thanks all.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2023-09-22 02:22 GMT
Find Nodes?
    Voting Booth?

    No recent polls found