camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Camel > VTD-XML
Date Fri, 16 Nov 2012 08:07:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/CAMEL/VTD-XML">VTD-XML</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~davsclaus">Claus
Ibsen</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-unchanged" >h2. VTD-XML <br></td></tr>
            <tr><td class="diff-changed-lines" >*Available as of Camel <span
class="diff-changed-words">2.1<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">1</span><span
class="diff-added-chars"style="background-color: #dfd;">0</span>*</span> <br></td></tr>
            <tr><td class="diff-unchanged" > <br>The VTD-XML component supports
the [VTD-XML Library|http://vtd-xml.sourceforge.net/] for very fast and efficient [XPath]
processing. The *camel-vtdxml* library is provided by the [Camel Extra|http://code.google.com/p/camel-extra/]
project which hosts all *GPL related components for Camel. <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="VTD-XML-VTDXML"></a>VTD-XML</h2>
<p><b>Available as of Camel 2.10</b></p>

<p>The VTD-XML component supports the <a href="http://vtd-xml.sourceforge.net/" class="external-link"
rel="nofollow">VTD-XML Library</a> for very fast and efficient <a href="/confluence/display/CAMEL/XPath"
title="XPath">XPath</a> processing. The <b>camel-vtdxml</b> library is
provided by the <a href="http://code.google.com/p/camel-extra/" class="external-link" rel="nofollow">Camel
Extra</a> project which hosts all *GPL related components for Camel.</p>

<h3><a name="VTD-XML-Using"></a>Using</h3>

<p>The VTD-XML is implemented as a Camel <a href="/confluence/display/CAMEL/Language"
title="Language">Language</a> which allows you to easily use it in the Camel routes.<br/>
This component is particular efficient for splitting files or other big payloads.</p>

<p>For example to split a big file containing many persons, you could do:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
    from(<span class="code-quote">"file:inbox"</span>)
      .split().vtdxml(<span class="code-quote">"/persons/person"</span>).streaming()
        .to(<span class="code-quote">"activemq:queue:person"</span>)
      .end()
</pre>
</div></div>

<p>And in XML DSL</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;route&gt;</span>
   <span class="code-tag">&lt;from uri=<span class="code-quote">"file:inbox"</span>/&gt;</span>
   <span class="code-tag">&lt;split streaming=<span class="code-quote">"true"</span>&gt;</span>
     <span class="code-tag">&lt;vtdxml&gt;</span>/persons/person<span
class="code-tag">&lt;/vtdxml&gt;</span>
     <span class="code-tag">&lt;to uri=<span class="code-quote">"activemq:queue:person"</span>/&gt;</span>
   <span class="code-tag">&lt;/split&gt;</span>
<span class="code-tag">&lt;/route&gt;</span>
</pre>
</div></div>

<p>This will run the <a href="/confluence/display/CAMEL/Splitter" title="Splitter">Splitter</a>
in streaming mode using the <b>vtdxml</b> language.</p>

<h3><a name="VTD-XML-SeeAlso"></a>See Also</h3>
<ul>
	<li><a href="/confluence/display/CAMEL/Configuring+Camel" title="Configuring Camel">Configuring
Camel</a></li>
	<li><a href="/confluence/display/CAMEL/Component" title="Component">Component</a></li>
	<li><a href="/confluence/display/CAMEL/Endpoint" title="Endpoint">Endpoint</a></li>
	<li><a href="/confluence/display/CAMEL/Getting+Started" title="Getting Started">Getting
Started</a></li>
</ul>

    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/CAMEL/VTD-XML">View Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=30149155&revisedVersion=3&originalVersion=2">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/CAMEL/VTD-XML?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message