We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 554f659 commit 916dedfCopy full SHA for 916dedf
ext/dom/tests/canonicalization_special_nodes.phpt
@@ -0,0 +1,37 @@
1
+--TEST--
2
+Test: Canonicalization with special nodes
3
+--EXTENSIONS--
4
+dom
5
+--FILE--
6
+<?php
7
+$xml = <<<EOXML
8
+<?xml version="1.0"?>
9
+<!DOCTYPE doc [
10
+]>
11
+<doc xmlns="">
12
+ <![CDATA[bar]]>
13
+ <!-- x -->
14
+ <temp xmlns=""/>
15
+ <?pi-no-data ?>
16
+</doc>
17
+EOXML;
18
+
19
+$dom = new DOMDocument();
20
+$dom->loadXML($xml);
21
+$doc = $dom->documentElement;
22
+echo $doc->C14N(withComments: true);
23
+echo $doc->C14N(withComments: false);
24
25
+?>
26
+--EXPECT--
27
+<doc>
28
+ bar
29
30
+ <temp></temp>
31
+ <?pi-no-data?>
32
+</doc><doc>
33
34
35
36
37
0 commit comments