Re: XPath - save a file
by Matt Sergeant other posts by this author
Jan 25 2001 10:05PM messages near this date
view in the new Beta List Site
Re: XPath - save a file
|
Re: XPath - save a file
On Thu, 25 Jan 2001, Kip Hampton wrote:
>
> 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.
<infoset_police>
Just to clarify, root node isn't the top-most element, but a virtual node
that contains all top-level nodes (which may include comments, processing
instructions, and the root element itself).
</infoset_police>
--
<Matt/>
/|| ** Director and CTO **
//|| ** AxKit.com Ltd ** ** XML Application Serving **
// || ** http://axkit.org ** ** XSLT, XPathScript, XSP **
// \\| // ** Personal Web Site: http://sergeant.org/ **
\\//
//\ // \
_______________________________________________
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
|