11 <root xmlns=
"http://sabredav.org/ns" />
18 $this->assertEquals(
'{http://sabredav.org/ns}root',
$reader->getClark());
33 $this->assertEquals(
'{}root',
$reader->getClark());
46 $this->assertNull(
$reader->getClark());
53 <root xmlns=
"http://sabredav.org/ns">
67 'name' =>
'{http://sabredav.org/ns}root',
70 'name' =>
'{http://sabredav.org/ns}elem1',
77 'name' =>
'{http://sabredav.org/ns}elem2',
80 'name' =>
'{http://sabredav.org/ns}elem3',
93 $this->assertEquals($expected,
$output);
100 <?xml version=
"1.0"?>
101 <root xmlns=
"http://sabredav.org/ns">
102 <foo><![CDATA[bar]]></foo>
112 'name' =>
'{http://sabredav.org/ns}root',
115 'name' =>
'{http://sabredav.org/ns}foo',
125 $this->assertEquals($expected,
$output);
132 <?xml version=
"1.0"?>
133 <root xmlns=
"http://sabredav.org/ns" xmlns:foo=
"urn:foo">
134 <elem1 foo:attr=
"val" />
144 'name' =>
'{http://sabredav.org/ns}root',
147 'name' =>
'{http://sabredav.org/ns}elem1',
150 '{urn:foo}attr' =>
'val',
157 $this->assertEquals($expected,
$output);
164 <?xml version=
"1.0"?>
165 <root xmlns=
"http://sabredav.org/ns">
172 '{http://sabredav.org/ns}elem1' =>
'Sabre\\Xml\\Element\\Mock' 179 'name' =>
'{http://sabredav.org/ns}root',
182 'name' =>
'{http://sabredav.org/ns}elem1',
191 $this->assertEquals($expected,
$output);
201 <?xml version=
"1.0"?>
202 <root xmlns=
"http://sabredav.org/ns">
209 '{http://sabredav.org/ns}elem1' => new \StdClass()
222 <?xml version=
"1.0"?>
223 <root xmlns=
"http://sabredav.org/ns">
230 '{http://sabredav.org/ns}elem1' =>
function(
Reader $reader) {
240 'name' =>
'{http://sabredav.org/ns}root',
243 'name' =>
'{http://sabredav.org/ns}elem1',
252 $this->assertEquals($expected,
$output);
262 <?xml version=
"1.0"?>
292 $this->assertEquals($expected,
$output);
302 <?xml version=
"1.0"?>
303 <root xmlns=
"http://sabredav.org/ns">
305 <elem2>hello </elem2>
313 '{http://sabredav.org/ns}elem1' =>
function(
Reader $reader) {
322 'name' =>
'{http://sabredav.org/ns}root',
325 'name' =>
'{http://sabredav.org/ns}elem1',
326 'value' =>
'hello world',
334 $this->assertEquals($expected,
$output);
341 <?xml version=
"1.0"?>
342 <root xmlns=
"http://sabredav.org/ns">
347 '{http://sabredav.org/ns}elem1' =>
'Sabre\\Xml\\Element\\Mock' 353 $this->fail(
'We expected a ParseException to be thrown');
356 $this->assertInternalType(
'array', $e->
getErrors());
368 <?xml version=
"1.0"?>
369 <root xmlns=
"http://sabredav.org/ns">
376 '{http://sabredav.org/ns}elem1' =>
'Sabre\\Xml\\Element\\Eater' 412 <?xml version=
"1.0" encoding=
"UTF-8"?>
415 <participant
id=
"sid-A33D08EB-A2DE-448F-86FE-A2B62E98818" name=
"Company" processRef=
"sid-A0A6A196-3C9A-4C69-88F6-7ED7DDFDD264">
417 <signavio:signavioMetaData metaKey=
"bgcolor" />
420 <signavio:signavioMetaData metaKey="bgcolor
" metaValue=""/> 424 $reader = new Reader(); 425 $reader->xml($input); 434 function testParseInnerTree() { 437 <?xml version="1.0
"?> 447 '{http://sabredav.org/ns}elem1' =>
function(
Reader $reader) {
449 $innerTree =
$reader->parseInnerTree([
'{http://sabredav.org/ns}elem1' =>
function(
Reader $reader) {
462 'name' =>
'{http://sabredav.org/ns}root',
465 'name' =>
'{http://sabredav.org/ns}elem1',
468 'name' =>
'{http://sabredav.org/ns}elem1',
480 $this->assertEquals($expected,
$output);
490 <?xml version=
"1.0"?>
491 <root xmlns=
"http://sabredav.org/ns">
499 $reader->elementMap = [
500 '{http://sabredav.org/ns}elem1' =>
function(
Reader $reader) {
515 'name' =>
'{http://sabredav.org/ns}root',
518 'name' =>
'{http://sabredav.org/ns}elem1',
521 'name' =>
'{http://sabredav.org/ns}elem1',
533 $this->assertEquals($expected,
$output);
543 <?xml version=
"1.0"?>
544 <root xmlns=
"http://sabredav.org/ns">
552 $reader->elementMap = [
553 '{http://sabredav.org/ns}elem1' =>
function(
Reader $reader) {
568 'name' =>
'{http://sabredav.org/ns}root',
571 'name' =>
'{http://sabredav.org/ns}elem1',
580 $this->assertEquals($expected,
$output);
parse()
Reads the entire document.
parseGetElements(array $elementMap=null)
parseGetElements parses everything in the current sub-tree, and returns a an array of elements...
getErrors()
Returns the LibXML errors.
testBrokenXml()
Test was added for Issue #10.
This exception is thrown when the Readers runs into a parsing error.
The Reader class expands upon PHP's built-in XMLReader.
testMappedElementCallBackNoNamespace()
testMappedElementCallBack
testGetClarkNotOnAnElement()
testReadText()
testMappedElementCallBack
testBrokenXml2()
Test was added for Issue #45.
testSimpleNamespacedAttribute()
testParseGetElementsNoElements()
testParseInnerTree
testMappedElementBadClass()
testMappedElementCallBack()
testMappedElement
testParseGetElements()
testParseInnerTree