IT. Expert System.

PHP

Substitutes XIncludes in a DomDocument Object


DomDocument::xinclude

(PHP 5)

DomDocument::xinclude Substitutes XIncludes in a DomDocument Object

Description

int DomDocument::xinclude ( void )

This function substitutes » XIncludes in a DomDocument object.

Example #1 Substituting Xincludes

<?php

// include.xml contains :
// <child>test</child> 

$xml '<?xml version="1.0"?>
<root xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="include.xml">
    <xi:fallback>
      <error>xinclude: include.xml not found</error>
    </xi:fallback>
  </xi:include>
</root>'
;

$domxml domxml_open_mem($xml);
$domxml->xinclude();

echo 
$domxml->dump_mem();

?>

The above example will output:

 <?xml version="1.0"?> <root xmlns:xi="http://www.w3.org/2001/XInclude"> <child>test</child> </root> 

If include.xml doesn't exist, you'll see:

 <?xml version="1.0"?> <root xmlns:xi="http://www.w3.org/2001/XInclude"> <error>xinclude:dom.xml not found</error> </root> 



Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 15343 / 248392566. Delta: 0.02603 с