<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Read and write XML</title>
	<atom:link href="http://www.javablogging.com/read-and-write-xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javablogging.com/read-and-write-xml/</link>
	<description>Tracking surprises, features and bugs</description>
	<lastBuildDate>Sun, 05 Feb 2012 15:43:49 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Spirou Svalsson</title>
		<link>http://www.javablogging.com/read-and-write-xml/comment-page-1/#comment-21414</link>
		<dc:creator>Spirou Svalsson</dc:creator>
		<pubDate>Sun, 05 Feb 2012 15:43:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.javablogging.com/?p=679#comment-21414</guid>
		<description>Fixed it for me:

transformer.setOutputProperty(
   &quot;{http://xml.apache.org/xslt}indent-amount&quot;, &quot;5&quot;);</description>
		<content:encoded><![CDATA[<p>Fixed it for me:</p>
<p>transformer.setOutputProperty(<br />
   &#8220;{http://xml.apache.org/xslt}indent-amount&#8221;, &#8220;5&#8243;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lana</title>
		<link>http://www.javablogging.com/read-and-write-xml/comment-page-1/#comment-20142</link>
		<dc:creator>lana</dc:creator>
		<pubDate>Mon, 14 Nov 2011 02:38:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.javablogging.com/?p=679#comment-20142</guid>
		<description>Hello,

i have a problem with XMLWrite class. it doesn&#039;t format the output file and prints it all in one single line.

any help greatly appreciated.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>i have a problem with XMLWrite class. it doesn&#8217;t format the output file and prints it all in one single line.</p>
<p>any help greatly appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mironsadziak</title>
		<link>http://www.javablogging.com/read-and-write-xml/comment-page-1/#comment-470</link>
		<dc:creator>mironsadziak</dc:creator>
		<pubDate>Mon, 28 Sep 2009 13:49:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.javablogging.com/?p=679#comment-470</guid>
		<description>You are right IBBoard, this example is very generic. There is waaaay much more that you can do in Java for XML parsing. The examples here are supposed to be just a minimum to get somebody started. After that you have Javadoc and tons of much more detailed tutorials on the net.</description>
		<content:encoded><![CDATA[<p>You are right IBBoard, this example is very generic. There is waaaay much more that you can do in Java for XML parsing. The examples here are supposed to be just a minimum to get somebody started. After that you have Javadoc and tons of much more detailed tutorials on the net.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: IBBoard</title>
		<link>http://www.javablogging.com/read-and-write-xml/comment-page-1/#comment-469</link>
		<dc:creator>IBBoard</dc:creator>
		<pubDate>Mon, 28 Sep 2009 12:21:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.javablogging.com/?p=679#comment-469</guid>
		<description>And this time with the brackets the right way around!

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;root testAttr=&quot;testValue&quot;&gt;
	&lt;nest1&gt;
		&lt;nest2&gt;
			&lt;nest3&gt;
				&lt;child&gt;data1&lt;/child&gt;
			&lt;/nest3&gt;
		&lt;/nest2&gt;
	&lt;/nest1&gt;
	&lt;child&gt;data2&lt;/child&gt;
&lt;/root&gt;</description>
		<content:encoded><![CDATA[<p>And this time with the brackets the right way around!</p>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br />
&lt;root testAttr=&#8221;testValue&#8221;&gt;<br />
	&lt;nest1&gt;<br />
		&lt;nest2&gt;<br />
			&lt;nest3&gt;<br />
				&lt;child&gt;data1&lt;/child&gt;<br />
			&lt;/nest3&gt;<br />
		&lt;/nest2&gt;<br />
	&lt;/nest1&gt;<br />
	&lt;child&gt;data2&lt;/child&gt;<br />
&lt;/root&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: IBBoard</title>
		<link>http://www.javablogging.com/read-and-write-xml/comment-page-1/#comment-468</link>
		<dc:creator>IBBoard</dc:creator>
		<pubDate>Mon, 28 Sep 2009 12:19:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.javablogging.com/?p=679#comment-468</guid>
		<description>Try again - it treated the XML tags as HTML and lost them last time!

&gt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&lt;
&gt;root testAttr=&quot;testValue&quot;&lt;
	&gt;nest1&lt;
		&gt;nest2&lt;
			&gt;nest3&lt;
				&gt;child&lt;data1&gt;/child&lt;
			&gt;/nest3&lt;
		&gt;/nest2&lt;
	&gt;/nest1&lt;
	&gt;child&lt;data2&gt;/child&lt;
&gt;/root&lt;</description>
		<content:encoded><![CDATA[<p>Try again &#8211; it treated the XML tags as HTML and lost them last time!</p>
<p>&gt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&lt;<br />
&gt;root testAttr=&#8221;testValue&#8221;&lt;<br />
	&gt;nest1&lt;<br />
		&gt;nest2&lt;<br />
			&gt;nest3&lt;<br />
				&gt;child&lt;data1&gt;/child&lt;<br />
			&gt;/nest3&lt;<br />
		&gt;/nest2&lt;<br />
	&gt;/nest1&lt;<br />
	&gt;child&lt;data2&gt;/child&lt;<br />
&gt;/root&lt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: IBBoard</title>
		<link>http://www.javablogging.com/read-and-write-xml/comment-page-1/#comment-467</link>
		<dc:creator>IBBoard</dc:creator>
		<pubDate>Mon, 28 Sep 2009 12:18:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.javablogging.com/?p=679#comment-467</guid>
		<description>The first example works, but is somewhat generic (depending on what you want to do). If you passed it an XML file that was something like this:



	
		
			
				data1
			
		
	
	data2


Then it&#039;d return the same results, which is probably not what you&#039;d want. Also, you&#039;re working with a non-validating parser, so you can&#039;t be sure that the document even matches any schema you might have defined.</description>
		<content:encoded><![CDATA[<p>The first example works, but is somewhat generic (depending on what you want to do). If you passed it an XML file that was something like this:</p>
<p>				data1</p>
<p>	data2</p>
<p>Then it&#8217;d return the same results, which is probably not what you&#8217;d want. Also, you&#8217;re working with a non-validating parser, so you can&#8217;t be sure that the document even matches any schema you might have defined.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

