Ce scénario s'applique uniquement aux solutions Talend Open Studio for ESB, Talend ESB, Talend Data Services Platform, Talend MDM Platform, Talend Real Time Big Data Platform et Talend Data Fabric.
Pour plus d'informations concernant les technologies supportées par Talend, consultez Composants Mediation Talend.
Dans ce scénario, un composant cConvertBodyTo est utilisé pour convertir le corps d'un fichier XML en un document org.w3c.dom.Document.class. Un cBean importe le document org.w3c.dom.Document.class, vérifie son contenu et affiche le nom de l'élément racine ainsi que le contenu de chaque élément category.
Le fichier XML se présente ainsi :
<bookstore>
<bookshelf>
<category>Cooking</category>
<quantity>100</quantity>
</bookshelf>
<bookshelf>
<category>Languages</category>
<quantity>200</quantity>
</bookshelf>
<bookshelf>
<category>Arts</category>
<quantity>300</quantity>
</bookshelf>
<bookshelf>
<category>Science</category>
<quantity>400</quantity>
</bookshelf>
</bookstore>