Skip to content

Getting Started: 3. Adding XML Fragments

Daniele Orlando edited this page Feb 21, 2016 · 2 revisions

Sometimes XML/XHTML comes from legacy templating systems or external sources. In those cases the raw XML fragment can be injected directly into the document.

$book->add('cover', true)
        ->add(<<
              

The Theory Of Everything

XML );

Pro Tip:
The XML fragment doesn't need necessarily a root node, as in the example above.

4. XPath Queries 〉

Clone this wiki locally