Re: [PHP] Re: SimpleXML & libxml options (XInclude)



Rob Richards wrote:
No need to even do that. The document is the same document (zero copy which is why going back and forth is efficient), so when its changed by the xinclude call, it is reflected in $xml already. Only reason you would need to do conversions back and forth is if you need specific nodes that might have been added/changed by the other extension. Here you are using the same root element and dont have to worry about losing any child references you might already have, so its a wasted call.

So really when you perform:

$dom = dom_import_simplexml($xml);

the $dom object is really created by taking a reference to the $xml object rather than copying it? i.e. (I know this isn't real code)

$dom = dom_import_simplexml(& $xml);

Is this correct?
.



Relevant Pages

  • Re: How to export content from a JS Dom object
    ... > Ksou wrote: ... >> I would like to ask how can I submit a dom object content (e.g. xml ... > With XMLHttpRequest the send method can take an XML document object, ...
    (comp.lang.javascript)
  • Re: CreateXMLFile
    ... DOM object ... Set XMLDoc = CreateObject ... If XMLDoc.loadXML(sXML) = 0 then msgbox "XML not parsed" ...
    (comp.text.xml)
  • UTF8 Encoding
    ... I have a problem where I am working with extended character sets in XML but ... generated Xml document I get the dreaded message, "Data at the root level is ... the DOM object and keep all character encoding in tact? ... // Load resulting Xml Document into DOM ...
    (microsoft.public.dotnet.xml)
  • Re: Any python HTML generator libs?
    ... I am now using XML to store my lab report records. ... into XML, for storage, HTML display and search. ... the DOM object could realize the XML ...
    (comp.lang.python)
  • newbie need help with XInclude ASAP!
    ... Hi All sorry for the ASAP, I have been working with XML for about a ... year and somehow I never used XInclude. ...
    (comp.text.xml)