RE: libxml2 application data

philippe marguinaud <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
Hi Robin,

Well, I am not very keen on stuffing data into attributes; moreover, I could not store Perl data such as hashrefs, etc...
Using an id is not very effective too; I would have no clue when nodes get destroyed or created.
I really need to associate data to my XML nodes. I would like to do that in Perl, and I like XML::LibXML because I know it is fast and gives access to XPath.

Regards,

Philippe



> CC: [email protected]; [email protected]
> From: [email protected]
> To: [email protected]
> Subject: Re: libxml2 application data
> Date: Mon, 22 Dec 2008 16:10:32 +0100
> 
> Hi Philippe,
> 
> On Dec 22, 2008, at 14:48 , philippe marguinaud wrote:
> > I have thought about using the $$node trick, but when the XML tree  
> > is modified ( for instance when a node is deleted ), then some of  
> > the nodes are re-numbered. I can provide a demo script to illustrate  
> > this if you want.
> > So I am stuck with XML::LibXML, I will have to find another module...
> 
> It may not be exactly what you're looking for, but if your nodes are  
> elements you can stuff your data inside the tree using a namespace of  
> your own (if they're not elements, it can still be done to a point but  
> it can become hacky).
> 
> Also, if you gave us a (rough) description of what you're trying to do  
> we could perhaps suggest options other than decorating the tree  
> directly.
> 
> -- 
> Robin Berjon - http://berjon.com/
>      Feel like hiring me? Go to http://robineko.com/
> 
> 
> 
> 
> 

_________________________________________________________________
Show them the way! Add maps and directions to your party invites. 
http://www.microsoft.com/windows/windowslive/events.aspx

_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.