--TEST-- Test: Canonicalization - C14N() --SKIPIF-- --FILE-- EOXML; $dom = new DOMDocument(); $dom->loadXML($xml); $doc = $dom->documentElement->firstChild; /* inclusive/without comments first child element of doc element is context. */ echo $doc->C14N()."\n\n"; /* exclusive/without comments first child element of doc element is context. */ echo $doc->c14N(TRUE)."\n\n"; /* inclusive/with comments first child element of doc element is context. */ echo $doc->C14N(FALSE, TRUE)."\n\n"; /* exclusive/with comments first child element of doc element is context. */ echo $doc->C14N(TRUE, TRUE)."\n\n"; /* exclusive/without comments using xpath query. */ echo $doc->c14N(TRUE, FALSE, array('query'=>'(//. | //@* | //namespace::*)'))."\n\n"; /* exclusive/without comments first child element of doc element is context. using xpath query with registered namespace. test namespace prefix is also included. */ echo $doc->c14N(TRUE, FALSE, array('query'=>'(//a:contain | //a:bar | .//namespace::*)', 'namespaces'=>array('a'=>'http://www.example.com/ns/foo')), array('test'))."\n\n"; /* exclusive/without comments first child element of doc element is context. test namespace prefix is also included */ echo $doc->C14N(TRUE, FALSE, NULL, array('test')); ?> --EXPECTF--