Advertisement
Guest User

Untitled

a guest
Aug 20th, 2015
714
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.01 KB | None | 0 0
  1. $doc = new \XMLReader();
  2. $doc->xml('<?xml version="1.0" encoding="UTF-8"?>
  3. <chapter xmlns="http://docbook.org/ns/docbook" version="5.0">
  4. <title>Test Chapter</title>
  5. <para>
  6. This is a paragraph in the test chapter. It is unremarkable in
  7. every regard. This is a paragraph in the test chapter. It is
  8. unremarkable in every regard. This is a paragraph in the test
  9. chapter. It is unremarkable in every regard.
  10. </para>
  11. <paar>
  12. <emphasis role="bold">This</emphasis> paragraph contains
  13. <emphasis>some <emphasis>emphasized</emphasis> text</emphasis>
  14. 1and a <superscript>super</superscript>script
  15. and a <subscript>sub</subscript>script.
  16. </para>
  17. <para>
  18. This is a paragraph in the test chapter. It is unremarkable in
  19. every regard. This is a paragraph in the test chapter. It is
  20. unremarkable in every regard. This is a paragraph in the test
  21. chapter. It is unremarkable in every regard.
  22. </para>
  23. </chapter>');
  24. $doc->setRelaxNGSchema('http://docs.oasis-open.org/docbook/rng/5.0/docbook.rng');
  25. while (@$doc->read() !== false) {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement