ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
Re: XPath - save a file
by Kip Hampton other posts by this author
Jan 25 2001 11:06AM messages near this date
view in the new Beta List Site
XPath - save a file | Re: XPath - save a file
Hi Romeo,

>  Romeo Juncu wrote:
>  
>  I just discovered today XML::XPath and I have to make a quick
>  decision, but I nned to know....
>  XML::XPath is able to save it's content to a xml file???
>  I've tried but it didn't work.
>  

try...

open (XML, "> somefile.xml") || die "File Error: Could not open XML file
for writing. $!";
print XML $root_node-> toString;
close XML;

...where $root_node is the, er, root node (or top-most element) of the
XPath tree that you've built.

HTH,
-kip
 
-- 
"Perl was written first of all to let the Artist make amoral decisions."
- Larry Wall
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
http://listserv.ActiveState.com/mailman/listinfo/perl-xml
Thread:
Romeo Juncu
Kip Hampton
Matt Sergeant
Romeo Juncu
Matt Sergeant

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved