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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nbijnens at servs dot eu
New email:
PHP Version: OS:

 

 [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: Sat Dec 21 13:01:31 2024 UTC