Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Moving a tag within text with XML::Twig

by mirod (Canon)
on Sep 26, 2005 at 08:46 UTC ( [id://495034]=note: print w/replies, xml ) Need Help??


in reply to Re: Moving a tag within text with XML::Twig
in thread Moving a tag within text with XML::Twig

(I also had some trouble getting my head around this -- realizing that the tree created by XML::Twig includes both objects that represent whole markup units and objects that hold the text content ((P)CDATA), if any, that precede and/or follow each whole markup unit.

Just a comment on this: all complete models of XML trees (like the DOM) store the text itself in separate nodes. Otherwise you can't really process mixed content very well. Tools like XML::Simple do not cope very well with mixed content.

In a lot of models, text nodes and element nodes are in 2 different classes, but for simplicity's sake I chose to make them just 1 class, which might have been a mistake.

Does it make sense?

  • Comment on Re^2: Moving a tag within text with XML::Twig

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-26 06:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found