in reply to Re: Modifying Records with XML::SAX::ByRecord
in thread Modifying Records with XML::SAX::ByRecord

I don't know whether it's against the rules of XML (I seriously doubt it!) but I've met way too many cases when the other party insisted that the tags are in a specific order so I would be very wary of changing the order. I'd suggest XML::Twig or XML::Rules for this and processing the whole records. If there are hundreds of thousands of them i do think it's safe to assume the individual records are rather small.

  • Comment on Re^2: Modifying Records with XML::SAX::ByRecord

Replies are listed 'Best First'.
Re^3: Modifying Records with XML::SAX::ByRecord
by trwww (Priest) on Aug 31, 2007 at 03:51 UTC

    Hi Jenda

    I don't know whether it's against the rules of XML (I seriously doubt it!)

    I was speaking out of turn. I'm not sure either. It is easy to prove by defining it in either a document declaration or a xml schema. If that is possible, it is legal.

    but I've met way too many cases when the other party insisted that the tags are in a specific order so I would be very wary of changing the order.

    An artificial limitation with things like XPath. But I can see how it happens, too.

    If there are hundreds of thousands of them i do think it's safe to assume the individual records are rather small.

    My experience is different :-) But yes if I can assume the records are smallish, your advice is better in many ways (a lot more code is already written for you). I should have mentioned that.

    trwww