<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6618.4">
<TITLE>Creating an Entity reference</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">All,</FONT>
<BR> <FONT SIZE=2 FACE="Arial">I'm having a bit of an issue understanding how to create an entity . My understanding is to create an instance of a document and use the "createEntityReference(name)" method to create the entity.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">At present I am using the code below to generate my XML document:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">#Python 2.4.3</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">from xml.dom import getDOMImplementation</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">impl = getDOMImplementation()</FONT>
<BR><FONT SIZE=2 FACE="Arial">doctype = impl.createDocumentType( 'Xdmf', None, 'Xdmf.dtd' )</FONT>
<BR><FONT SIZE=2 FACE="Arial">self.xml_doc = impl.createDocument(None, "Xdmf", doctype)</FONT>
<BR><FONT SIZE=2 FACE="Arial">self.root = self.xml_doc.documentElement</FONT>
<BR><FONT SIZE=2 FACE="Arial">self.xml_doc.appendChild( self.root ) </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">How would I modify it to add an entity reference?</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Thanks in advance,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">John </FONT>
</P>
</BODY>
</HTML>