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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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 Mar 29 11:01:29 2024 UTC