<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Using Java XML API</title>
	<atom:link href="http://pitfalls.wordpress.com/2008/09/01/using-java-xml-api/feed/" rel="self" type="application/rss+xml" />
	<link>http://pitfalls.wordpress.com/2008/09/01/using-java-xml-api/</link>
	<description></description>
	<lastBuildDate>Tue, 11 Aug 2009 16:12:23 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Matt McGinty</title>
		<link>http://pitfalls.wordpress.com/2008/09/01/using-java-xml-api/#comment-163</link>
		<dc:creator>Matt McGinty</dc:creator>
		<pubDate>Tue, 11 Aug 2009 16:12:23 +0000</pubDate>
		<guid isPermaLink="false">http://pitfalls.wordpress.com/?p=51#comment-163</guid>
		<description>Thanks for the information.
But I don&#039;t quite follow your example code which includes doc1Node and doc2Node.
It does not actually make use of doc2Node.
So I&#039;m not sure that it would work as written.

I am currently dealing with the &quot;WRONG_DOCUMENT_ERR&quot; issue using Xalan 2.7.1 so could you please clarify the sample code?

Thanks.

Matt</description>
		<content:encoded><![CDATA[<p>Thanks for the information.<br />
But I don&#8217;t quite follow your example code which includes doc1Node and doc2Node.<br />
It does not actually make use of doc2Node.<br />
So I&#8217;m not sure that it would work as written.</p>
<p>I am currently dealing with the &#8220;WRONG_DOCUMENT_ERR&#8221; issue using Xalan 2.7.1 so could you please clarify the sample code?</p>
<p>Thanks.</p>
<p>Matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Toan.Vu</title>
		<link>http://pitfalls.wordpress.com/2008/09/01/using-java-xml-api/#comment-157</link>
		<dc:creator>Toan.Vu</dc:creator>
		<pubDate>Thu, 16 Jul 2009 04:29:50 +0000</pubDate>
		<guid isPermaLink="false">http://pitfalls.wordpress.com/?p=51#comment-157</guid>
		<description>You add 
at the top of html page.</description>
		<content:encoded><![CDATA[<p>You add<br />
at the top of html page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fazalgupta</title>
		<link>http://pitfalls.wordpress.com/2008/09/01/using-java-xml-api/#comment-135</link>
		<dc:creator>fazalgupta</dc:creator>
		<pubDate>Thu, 06 Nov 2008 06:52:25 +0000</pubDate>
		<guid isPermaLink="false">http://pitfalls.wordpress.com/?p=51#comment-135</guid>
		<description>One interesting thing i found with html output method was the issue with self closing tags. E.g. for a tag like  which is a self closing tag, trying to generate the HTML String using html output method leaves such tags open breaking the actual well formed structure. I am not sure if this is a reported bug in Xalan but I am still figuring out why this happens.

Also as such Outputkeys Class the method parameter documentation states that xhtml can be used as a method if implemented by spefic providers. Following is the java doc

Other non-namespaced  values may be used, such as &quot;xhtml&quot;, but, if accepted, the handling of such values is implementation defined.  If any of the method values are not accepted and are not namespace qualified,  then {@link  javax.xml.transform.Transformer#setOutputProperty}
 or {@link javax.xml.transform.Transformer#setOutputProperties} will
  throw a {@link java.lang.IllegalArgumentException}.

But when I tried this with Xalan, the xhtml output method though not supported (checked by debugging in the code), it never throws an exception..

I think the people implementing XML APIs need to become more consistent to make life easier for people like us.

In this context comment given by Christopher Sahnwaldt is relevant as we may need to make well formed the html string generated.</description>
		<content:encoded><![CDATA[<p>One interesting thing i found with html output method was the issue with self closing tags. E.g. for a tag like  which is a self closing tag, trying to generate the HTML String using html output method leaves such tags open breaking the actual well formed structure. I am not sure if this is a reported bug in Xalan but I am still figuring out why this happens.</p>
<p>Also as such Outputkeys Class the method parameter documentation states that xhtml can be used as a method if implemented by spefic providers. Following is the java doc</p>
<p>Other non-namespaced  values may be used, such as &#8220;xhtml&#8221;, but, if accepted, the handling of such values is implementation defined.  If any of the method values are not accepted and are not namespace qualified,  then {@link  javax.xml.transform.Transformer#setOutputProperty}<br />
 or {@link javax.xml.transform.Transformer#setOutputProperties} will<br />
  throw a {@link java.lang.IllegalArgumentException}.</p>
<p>But when I tried this with Xalan, the xhtml output method though not supported (checked by debugging in the code), it never throws an exception..</p>
<p>I think the people implementing XML APIs need to become more consistent to make life easier for people like us.</p>
<p>In this context comment given by Christopher Sahnwaldt is relevant as we may need to make well formed the html string generated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher Sahnwaldt</title>
		<link>http://pitfalls.wordpress.com/2008/09/01/using-java-xml-api/#comment-113</link>
		<dc:creator>Christopher Sahnwaldt</dc:creator>
		<pubDate>Tue, 02 Sep 2008 18:01:11 +0000</pubDate>
		<guid isPermaLink="false">http://pitfalls.wordpress.com/?p=51#comment-113</guid>
		<description>To parse HTML that may not be well-formed XML, try http://htmlcleaner.sourceforge.net</description>
		<content:encoded><![CDATA[<p>To parse HTML that may not be well-formed XML, try <a href="http://htmlcleaner.sourceforge.net" rel="nofollow">http://htmlcleaner.sourceforge.net</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
