xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Mörén <johan.mo...@spray.se>
Subject RE: serializing the Docktype
Date Tue, 01 Feb 2000 13:35:37 GMT
Hi! thanks for the fast reply, however it didn't solve the problem. 

Johan/

-----Original Message-----
From: Martin Tronstad [mailto:martin@gan.no]
Sent: den 1 februari 2000 12:20
To: general@xml.apache.org
Subject: RE: serializing the Docktype


Hello

According to xml the doctype name and the root element must bee the same.
Xml is defined CASE sensitiv, it might be your problem.

Martin

-----Original Message-----
From: Johan M rén [mailto:johan.moren@spray.se]
Sent: Tuesday, February 01, 2000 10:40 AM
To: 'general@xml.apache.org'
Subject: serializing the Docktype


Hi i'm having trouble with serializing my documents. It feels like i tried
everything but maybe someone can point me in the right direction.

The document serializes fine to a file on my system, however the "<!DOCTYPE
content SYSTEM "content.dtd">" won't show up in the serialized file.

This is the document and the JavaCode im using when to serialize the doc
with the XMLSerializer:

**** JAVACODE ****

FileOutputStream fOut = new FileOutputStream(daFile);
OutputFormat oFormat = new OutputFormat(doc,"ISO-8859-1",false);
oFormat.setPreserveSpace(true);
XMLSerializer xmlz = new XMLSerializer(fOut,oFormat);
xmlz.serialize(doc);

**** /JAVACODE ****

***** XML *****

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE content SYSTEM "content.dtd">
<?xml-stylesheet type="text/xsl" href="regular.xsl"?>
<CONTENT>
	<REGULAR>
		<ORIGIN>
			<MAIL>epatraktor@spray.se</MAIL>
			<ORGANIZATION>Spray AB</ORGANIZATION>
		</ORIGIN>
	   	<ID>1</ID>
   		<SORT>sitetips</SORT>
   		<HOME>spray.sport.motor</HOME>
		<AVAILABLE>9000000</AVAILABLE>
		<EXPIRES>9000100</EXPIRES>
		<AUTHOR>Arne Keutram</AUTHOR>
		<NAME>sport sitetips 24/1</NAME>
   		<HEADING>Dagens Sitetips</HEADING>
   		<TITLE>Rockarsite</TITLE>
   		<PUSHER>Surfa till den här siten. Den rockar.</PUSHER>
   		<BODY>Some Text</BODY>
		<LINK>http://www.spray.se</LINK>
   		<CONTENTIMAGE>
      			<NAME>formel1.gif</NAME>
				<PATH>sport/images/</PATH>
				<TEXT>Cool bil</TEXT>
      			<WIDTH>30</WIDTH>
      			<HEIGHT>30</HEIGHT>
   		</CONTENTIMAGE>
	</REGULAR>
</CONTENT>

**** XML ****


Tnx in advance!!

________________________________s_p_r_a_y
Johan Mörén | johan.moren@spray.se
Tel: 08-52790258 | Mob: 0709-322214
Home: 08-332826 | ICQ: 40762148



Mime
View raw message