Re: Re: simpleXML expressions

From: Date: Tue, 06 Jul 2004 09:46:54 +0000
Subject: Re: Re: simpleXML expressions
References: 1 2 3  Groups: php.xml.dev 
Request: Send a blank email to php-xml-dev+get-409@lists.php.net to get a copy of this message
Sorry, thought I had mentioned that a while back. Using simplexml as input works fine. php_libxml_import_node() was implemented so that extensions could register themselves to support interoperability without having to use hard coded methods. Rob From: Christian Stocker > I wasn't aware of that either :) But yes, it looks like this is > possible. php_libxml_import_node() takes care of it, but maybe Rob can > clarify that further > > chregu > > On 5.7.2004 9:00 Uhr, Jason Barnett wrote: > > Another note about simpleXML. In most of the examples that talk about > > using the XsltProcessor they say to use DomDocuments for the xml / xsl > > files. However, I've noticed that you can also load the xml / xsl files > > into simpleXML objects. I haven't tested this much, but everything has > > worked as I would expect so far (PHP5-RC3). Are there any internal > > quirks which might make this A Bad Thing? > > > > <?php > > > > $xml = simpleXML_load_file('file.xml'); > > $xsl = simpleXML_load_file('file.xsl'); > > $proc = new XsltProcessor(); > > $proc->importStylesheet($xsl); > > $doc = $proc->transformToDoc($xml); > > > > ?>

« previous php.xml.dev (#409) next »