<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	>
<channel>
	<title>Comments on: Java to XML, without a template??</title>
	<atom:link href="http://blog.smooks.org/2009/01/28/java-to-xml-without-a-template/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.smooks.org/2009/01/28/java-to-xml-without-a-template/</link>
	<description>The official blog</description>
	<lastBuildDate>Tue, 07 Sep 2010 15:08:34 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: tom</title>
		<link>http://blog.smooks.org/2009/01/28/java-to-xml-without-a-template/comment-page-1/#comment-12</link>
		<dc:creator>tom</dc:creator>
		<pubDate>Thu, 05 Feb 2009 08:44:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.smooks.org/?p=16#comment-12</guid>
		<description>@Rahul: Rahul, please take stuff like this to the users forum.  When/if you do, please provide more info ;)</description>
		<content:encoded><![CDATA[<p>@Rahul: Rahul, please take stuff like this to the users forum.  When/if you do, please provide more info <img src='http://blog.smooks.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rahul Dhaware</title>
		<link>http://blog.smooks.org/2009/01/28/java-to-xml-without-a-template/comment-page-1/#comment-11</link>
		<dc:creator>Rahul Dhaware</dc:creator>
		<pubDate>Thu, 05 Feb 2009 05:46:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.smooks.org/?p=16#comment-11</guid>
		<description>I am using smooks to create xml from java objects.
i have written template in smooks-config.xml file.

but after generating xml file the first tag  is missing.
and xml file not formatted also.

generated xml file:
18046643 N. B. LTD2701340201 ONTARIO INC3481456408 ONTARIO INC.4301552000 ONTARIO LTD.4791615074 ONTARIO INC.5511ST CARRIER CORP.8532ND MILE TRUCKING INC8963 SJ TRANSPORTATION LLC1013360 TRANSPORT, LLC1031374872 ONTARIO LIMITED


but i want following format:


 
    22323ABC
    Fast and Furious
  
  
    2323ADC
    Slow and Furious
  
 

How can i do it?

Can you please help me?</description>
		<content:encoded><![CDATA[<p>I am using smooks to create xml from java objects.<br />
i have written template in smooks-config.xml file.</p>
<p>but after generating xml file the first tag  is missing.<br />
and xml file not formatted also.</p>
<p>generated xml file:<br />
18046643 N. B. LTD2701340201 ONTARIO INC3481456408 ONTARIO INC.4301552000 ONTARIO LTD.4791615074 ONTARIO INC.5511ST CARRIER CORP.8532ND MILE TRUCKING INC8963 SJ TRANSPORTATION LLC1013360 TRANSPORT, LLC1031374872 ONTARIO LIMITED</p>
<p>but i want following format:</p>
<p>    22323ABC<br />
    Fast and Furious</p>
<p>    2323ADC<br />
    Slow and Furious</p>
<p>How can i do it?</p>
<p>Can you please help me?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tom</title>
		<link>http://blog.smooks.org/2009/01/28/java-to-xml-without-a-template/comment-page-1/#comment-10</link>
		<dc:creator>tom</dc:creator>
		<pubDate>Mon, 02 Feb 2009 07:22:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.smooks.org/?p=16#comment-10</guid>
		<description>@Casper: Sure, if you just need to serialize to from XML (i.e. you&#039;re in control of the serialize and deserialize with XStream) and you don&#039;t really mind the structure of the XML, then XStream is perfect for the job.

Some use cases where Smooks does make sense:

1. If you&#039;re trying to bind from an XML stream that was not constructed by XStream.  In this use case, it&#039;s not always so easy (and sometimes close to impossible) with XStream, especially if the XML data model structure is totally out of alignment with that of the Java object model being bound to (same applies to JAXB, accept worse).  

2. If you&#039;re trying to bind non XML data into your Java Object Model (e.g. CSV, EDI, JSON).

3. You&#039;re exchanging the same basic data between different parties, but in different formats e.g. receiving it as XML or CSV or EDI etc and sending it back out in different formats depending on the target endpoint (a classic integration type scenario), then Smooks can be a good fit because it allows you to bind the incoming data to your canonical form Java object model, and then use templating to generate the different output formats from that single canonical form.  So, you can implement an n-&gt;1-&gt;n (vs an n-&gt;n) type solution.  This would typically be easier to maintain and adding new input/output formats should be a lot easier.

3. If you have a huge data steam (XML, EDI etc) that needs to be split into many mini object models, each routed to a JMS queue for processing.  This can be done in a single pass over the message stream with Smooks.</description>
		<content:encoded><![CDATA[<p>@Casper: Sure, if you just need to serialize to from XML (i.e. you&#8217;re in control of the serialize and deserialize with XStream) and you don&#8217;t really mind the structure of the XML, then XStream is perfect for the job.</p>
<p>Some use cases where Smooks does make sense:</p>
<p>1. If you&#8217;re trying to bind from an XML stream that was not constructed by XStream.  In this use case, it&#8217;s not always so easy (and sometimes close to impossible) with XStream, especially if the XML data model structure is totally out of alignment with that of the Java object model being bound to (same applies to JAXB, accept worse).  </p>
<p>2. If you&#8217;re trying to bind non XML data into your Java Object Model (e.g. CSV, EDI, JSON).</p>
<p>3. You&#8217;re exchanging the same basic data between different parties, but in different formats e.g. receiving it as XML or CSV or EDI etc and sending it back out in different formats depending on the target endpoint (a classic integration type scenario), then Smooks can be a good fit because it allows you to bind the incoming data to your canonical form Java object model, and then use templating to generate the different output formats from that single canonical form.  So, you can implement an n->1->n (vs an n->n) type solution.  This would typically be easier to maintain and adding new input/output formats should be a lot easier.</p>
<p>3. If you have a huge data steam (XML, EDI etc) that needs to be split into many mini object models, each routed to a JMS queue for processing.  This can be done in a single pass over the message stream with Smooks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Casper Bang</title>
		<link>http://blog.smooks.org/2009/01/28/java-to-xml-without-a-template/comment-page-1/#comment-9</link>
		<dc:creator>Casper Bang</dc:creator>
		<pubDate>Sun, 01 Feb 2009 21:45:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.smooks.org/?p=16#comment-9</guid>
		<description>Just use XStream, one of the frameworks I&#039;ve used to most in Java: http://xstream.codehaus.org/</description>
		<content:encoded><![CDATA[<p>Just use XStream, one of the frameworks I&#8217;ve used to most in Java: <a href="http://xstream.codehaus.org/" rel="nofollow">http://xstream.codehaus.org/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
