<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>indiWiz.com &#187; xml</title>
	<atom:link href="http://indiwiz.com/tag/xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://indiwiz.com</link>
	<description>Subhash&#039;s Tech Log</description>
	<lastBuildDate>Sun, 29 Apr 2012 15:11:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>XSL Transform using Java</title>
		<link>http://indiwiz.com/2009/09/14/xsl-transform-using-java/</link>
		<comments>http://indiwiz.com/2009/09/14/xsl-transform-using-java/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 11:26:42 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xsl]]></category>
		<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=496</guid>
		<description><![CDATA[Have a look at the StreamSource API and StreamResult API to understand the various ways by which it can be instantiated.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><pre class="brush: java; title: ; notranslate">
import javax.xml.transform.Templates;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;

...

// The XSL source:
StreamSource xsl = new StreamSource(...);

// Create the transformer:
TransformerFactory factory = TransformerFactory.newInstance();
Templates template = factory.newTemplates(xsl); // can throw TransformerConfigurationException (parent exception is: TransformerException)
Transformer transformer = template.newTransformer(); // can throw TransformerConfigurationException

// The data XML source
StreamSource data = new StreamSource(...);

// The transformed output:
StreamResult out = new StreamResult(...);

// Transform using the Transformer instance:
transformer.transform(data, out); // can throw TransformerException
</pre>
<p>Have a look at the <a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/transform/stream/StreamSource.html">StreamSource API</a> and <a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/transform/stream/StreamResult.html">StreamResult API</a> to understand the various ways by which it can be instantiated.</p>
<div class="shr-publisher-496"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2009/09/14/xsl-transform-using-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XPath in Java: Code Snippet</title>
		<link>http://indiwiz.com/2009/04/25/xpath-in-java-code-snippet/</link>
		<comments>http://indiwiz.com/2009/04/25/xpath-in-java-code-snippet/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 04:41:28 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xpath]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=271</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><pre class="brush: java; title: ; notranslate">
try{
    InputStream is = ...;

    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(true);
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document doc = builder.parse(is);
    is.close();

    XPathFactory xfactory = XPathFactory.newInstance();
    XPath xpath = xfactory.newXPath();
    XPathExpression xpr = xpath.compile(&quot;/executors/executor&quot;);

    NodeList nodes = (NodeList)xpr.evaluate(doc, XPathConstants.NODESET);
    int size = nodes.getLength();
    for(int i=0; i&lt;size; i++){
        NamedNodeMap nnm = nodes.item(i).getAttributes();
        String strPath = nnm.getNamedItem(&quot;path&quot;).getNodeValue();
        String strClass = nnm.getNamedItem(&quot;class&quot;).getNodeValue();
        print(&quot;Path / Class: &quot; + strPath + &quot; / &quot; + strClass);
    }
} catch(ParserConfigurationException ex){
    print(ex.getMessage());
} catch(SAXException ex){
    print(ex.getMessage());
} catch(IOException ex){
    print(ex.getMessage());
} catch(XPathExpressionException ex){
    print(ex.getMessage());
}
</pre>
<div class="shr-publisher-271"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2009/04/25/xpath-in-java-code-snippet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XOM 1.2.1 Released</title>
		<link>http://indiwiz.com/2009/03/11/xom-121-released/</link>
		<comments>http://indiwiz.com/2009/03/11/xom-121-released/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 07:10:42 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=228</guid>
		<description><![CDATA[Version 1.2.1 of XOM, the XML parsing Java library written by Elliotte Rusty Harold is released.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>Version 1.2.1 of <a href="http://www.xom.nu/">XOM</a>, the XML parsing Java library written by Elliotte Rusty Harold is <a href="http://www.cafeaulait.org/oldnews/news2009March10.html">released</a>.</p>
<div class="shr-publisher-228"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2009/03/11/xom-121-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux command-line XSLT</title>
		<link>http://indiwiz.com/2009/02/02/linux-command-line-xslt/</link>
		<comments>http://indiwiz.com/2009/02/02/linux-command-line-xslt/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 11:58:05 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=195</guid>
		<description><![CDATA[To convert an XML based on a XSL, use this command: $ xsltproc /path/to/xsl.xsl /path/to/xml.xml The converted document will be written to STDOUT. To write to a particular file, you may use the -o parameter: $ xsltproc /path/to/xsl.xsl /path/to/xml.xml -o out.html Check the info/man pages for additional information.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>To convert an XML based on a XSL, use this command:</p>
<pre>
$ xsltproc /path/to/xsl.xsl /path/to/xml.xml
</pre>
<p>The converted document will be written to STDOUT. To write to a particular file, you may use the <tt>-o</tt> parameter:</p>
<pre>
$ xsltproc /path/to/xsl.xsl /path/to/xml.xml -o out.html
</pre>
<p>Check the info/man pages for additional information.</p>
<div class="shr-publisher-195"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2009/02/02/linux-command-line-xslt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

