[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-xml
Subject:    Re: XML::XPath to file
From:       John Gedeon <jgedeon () qualcomm ! com>
Date:       2003-06-13 18:18:04
[Download RAW message or body]

At 10:51 AM 6/13/2003, you wrote:
>On Thursday, Jun 12, 2003, at 01:15 Europe/London, John Gedeon wrote:
>
>>Hi all,
>>
>>     I have been using XML::XPath to read from xml files and would like 
>> to use the same XPath path definitions to create xml files. Is this 
>> possible? I tried using createNode but that didn't alter the xml file I 
>> opened. I am experimenting with XML::XPath::PerlSAX and XML::SAX::Writer 
>> but am not getting far. Any help is welcomed.
>
>To be honest you're better off using XML::LibXML if you want to do 
>DOM-like operations like createNode. XML::XPath is mostly a read-only 
>module, with very weak support for editing the tree, and it's not very 
>well supported (for which I'm entirely to blame!).

Thanks for the tip :) I ended up using XPath's appendChild and 
appendAttributes to create a tree (its a one time creation) and then pass 
the toString out put to a SAX parser and Writer to make it pretty. I know 
It is the long way around but it works.

>Matt.
>
>PS: If anyone wants to take over XML::XPath (or rather be a co-maintainer) 
>there's a fire sale on all my modules right now.


--
<>< Proverbs 3:5-6 "Trust in the Lord with all your heart and lean not on 
your own understanding;
                               in all your ways acknowledge him, and he 
will make your paths straight."

_______________________________________________
Perl-XML mailing list
Perl-XML@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic