xp-framework/xp-framework — Issue #129: Make xml.Tree / xml.Node preserve mixed text and node content
Author: kiesel
Created: 2012-02-29 16:55:39+00:00
State: open

```xml.Tree``` and ```xml.Node``` only support parsing non-mixed content, eg. either a node contains text or a node contains other nodes. When parsing XHTML-style documents, this is not sufficient; proper document structure cannot be preserved at the moment.

The following test shows what is supposed to work:

```php
withCallback($tree)->parse(trim('

This is some cascaded content.

'));

$this->assertEquals('document', $tree->root->getName());
$this->assertEquals(
'This is some cascaded content.',
$tree->root->children[0]->getSource(0)
);
}
```