php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42609 LIBXML_XINCLUDE not working
Submitted: 2007-09-10 11:38 UTC Modified: 2007-09-10 12:08 UTC
From: nbijnens at servs dot eu Assigned:
Status: Not a bug Package: SimpleXML related
PHP Version: 5.2.4 OS: Debian 4 Etch
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
28 + 6 = ?
Subscribe to this entry?

 
 [2007-09-10 11:38 UTC] nbijnens at servs dot eu
Description:
------------
The LIBXML_XINCLUDE paramter given to the SimpleXML::__construct() is being ignored. 

Xinclude does work with DOMDocument.

Using php-5.2.3


Reproduce code:
---------------
<?php

$xml = '
<test>
 <xi:include href="xmltobeincluded.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
</test>
';

$x = new SimpleXMLElement($xml, LIBXML_XINCLUDE);

echo $x->asXML();
?>

Expected result:
----------------
<test>
  <xtest>
   value
  </xtest>
</test>

Actual result:
--------------
<?xml version="1.0"?>
<test>
 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xmltobeincluded.xml"/>
</test>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-10 12:08 UTC] rrichards@php.net
that option is currently only implemented in libxml2 when using xmlreader
 [2022-02-27 20:55 UTC] ibcmaxcom at gmail dot com
i dont know if this old bugs still related
but my site https://137.184.250.104/ still has this problems eventhough i use latest php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 04 07:01:26 2024 UTC