Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Re: Are you looking at XML processing the right way? (merge)

by herveus (Parson)
on Mar 18, 2003 at 14:52 UTC ( #243995=note: print w/replies, xml ) Need Help??

in reply to Re: Are you looking at XML processing the right way? (merge)
in thread is XML too hard?


From a database perspective, XML is a species of hierarchical database. If you need to look at it from any angle other than the tree structure expressed in the nesting of the tags, you have a tedious problem. I'm not making a value judgement, per se, but you do have to keep this in mind. If you are trying to force a relational model into an XML format, you should expect "interesting" times.

I'm curious how one does a merge sort on two XML streams. If the structure can be parsed as a linear series of records, you have something to merge. It all depends on the trees. If you have a bunch of sticks without branches, you may have something. If you have a bunch of heavily branched shrubbery, you have a hard problem, unless you are taking paths from the root to each leaf as a record.

The "looks like an iterator" approach sounds interesting.

Now, I'm speaking in the general case. If the particular XML you work with is more tightly constrained, you can take advantage of that to better structure your code.

I've used XML::Twig for some parsing I do. I only need a subset of the data; it gives it to me without too much hassle. On the other hand, it did force me to syntax my invert a bit. :)


  • Comment on Re: Re: Are you looking at XML processing the right way? (merge)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://243995]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2018-05-25 02:05 GMT
Find Nodes?
    Voting Booth?