This is the type of task xslt is really well suited for.  Use an identity
template with a specific override, something like:

 <xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform";>

  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>

  <!-- replace text content of somelement -->
  <xsl:template match="/somewhere/someelement/text()" >
    <xsl:value-of select="new value" />
  <xsl:template>

</xsl:stylesheet>


On 25 April 2013 13:03, horyna <phoffic...@centrum.cz> wrote:

> Hi,
>
> i have a XML in exchange.body (
> getExchanges().get(0).getIn().getBody(String.class) )
>
> Has Camel some powerfull ability to change some elements in body?
>
> Somethink like:
> .transform(body().replaceValueOfElement("<someelement>","new
> value"))
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-to-replace-a-part-of-XML-tp5731535.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to