1<?xml version="1.0" ?>
2<!DOCTYPE foo [
3  <!ENTITY % bar "for R and S">
4  <!ENTITY % foo "for Omegahat">
5
6  <!ENTITY testEnt "test entity bar">
7  <!ENTITY logo SYSTEM "images/logo.gif" NDATA gif>
8  <!ENTITY % extEnt SYSTEM "http://www.omegahat.net">   <!-- include the contents of the README file in the same directory as this one. -->
9
10  <!ELEMENT x  (#PCDATA) >
11  <!ELEMENT y  (x)* >
12]>
13<!-- A comment -->
14<foo x="1">
15 <element attrib1="my value" />
16 &testEnt;
17 <?R sum(rnorm(100)) ?>
18 <a>
19  <!-- A comment -->
20  <b>
21    %extEnt;
22  </b>
23 </a>
24<![CDATA[
25 This is escaped data
26 containing < and &.
27]]>
28
29Note that this caused a segmentation fault if replaceEntities was
30not TRUE.
31That is,
32<code>
33xmlTreeParse("test.xml", replaceEntities = TRUE)
34</code>
35works, but
36<code>
37xmlTreeParse("test.xml")
38</code>
39does not if this is called before the one above.
40This is now fixed and was caused by
41treating an xmlNodePtr in the C code
42that had type XML_ELEMENT_DECL
43and so was in fact an xmlElementPtr.
44Aaah, C and casting!
45</foo>
46