RE: [BULK] - Re: Deleting a Node
by Ali Mesdaq other posts by this author
Nov 13 2006 9:32AM messages near this date
view in the new Beta List Site
Re: [BULK] - Re: Deleting a Node
|
Re: Deleting a Node
& XSLT Excellent thanks! Ok so if I use removeChild how can I commit my changes
to the same file I was reading from? I know I can do something like
write to a new file all the items I finished. But I would rather not
have to do a check for each item in my current list to a item in the new
list. But if I HAVE to I will but just prefer to keep things as simple
and as clean as possible.
Thanks
-----Original Message-----
From: Bruce Miller [mailto:bruce.miller@[...].gov]
Sent: Monday, November 13, 2006 9:27 AM
To: Mesdaq, Ali
Cc: perl-xml@[...].com
Subject: [BULK] - Re: Deleting a Node
Mesdaq, Ali wrote:
> I am using xml to keep a list of items I need to loop through. But I
> would like to delete the items as I am looping through. So in case if
> the system crashes and I boot back up I know where to continue from.
So
> now a few questions I have regarding that.
>
> One is what do I use to delete the node?
it's removeChild, but that is only going to affect the
_in_memory_ tree; it isn't going to help recover
from crashes unless you serialize & write the dom
back to a file after each removal.
I was looking through the
> documentation for libxml on cpan and I see "replaceNode" in the
> XML::LibXML::Node library but it seems like it keeps a copy around
which
> seems to be a little inefficient. I am pretty sure there is probably a
> better function for this but I couldn't find it and I would imagine it
> would be in the XML::LibXML::Node library.
>
> Second question is about the reliability of either the replaceNode
call
> or whatever the better function call is. How reliable is that call? If
I
> call that is there a chance the document could be in a non-valid
state?
> Or will that call ensure that it only deletes that node and not delete
> it partially?
Not completely clear what you mean;
You certainly can replace the node by a node that isn't allowed
by the dtd/schema, so it can easily be non valid in that sense.
>
> Thanks in advance.
> _______________________________________________
> Perl-XML mailing list
> Perl-XML@[...].com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--
bruce.miller@[...].gov
http://math.nist.gov/~BMiller/
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Ali Mesdaq
Liam Quin
Bruce Miller
Chilkat Software
Ali Mesdaq
Robin Berjon
Ali Mesdaq
Bruce Miller
Ali Mesdaq
Bruce Miller
Ali Mesdaq
John Saylor
|