tExtractXMLField empty retourne

Five Stars

tExtractXMLField empty retourne

Hi,

I have this response from the server:

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
   <env:Header/>
   <env:Body>
      <node:getNodesResponse xmlns:node="http://node.sdk.nms.ov.hp.com/">
         <return>
            <item>
               <created>2018-07-18T09:20:16.881+02:00</created>
               <deviceCategory>com.hp.ov.nms.devices.switch</deviceCategory>
               <deviceDescription>No Device Profile found for this device. The assigned SNMP OID is the top of a Palo Alto Networks subtree</deviceDescription>
               <deviceFamily>com.hp.ov.nms.devices.paloaltonetworks</deviceFamily>
               <deviceModel>Palo Alto Networks Generic</deviceModel>
               <deviceVendor>com.hp.ov.nms.devices.paloaltonetworks</deviceVendor>
               <discoveryState>DISCOVERY_COMPLETED</discoveryState>
               <endNode>false</endNode>
               <IPv4Router>false</IPv4Router>
               <id>382308043798</id>
               <lanSwitch>false</lanSwitch>
               <longName>172.29.7.230</longName>
               <managementMode>MANAGED</managementMode>
               <modified>2019-02-14T11:37:32.106+01:00</modified>
               <name>fw-int-cbs</name>
               <notes/>
               <snmpSupported>true</snmpSupported>
               <snmpVersion>V2C</snmpVersion>
               <status>NORMAL</status>
               <systemContact>Dpt. Comunicacions</systemContact>
               <systemDescription>Palo Alto Networks PA-5200 series firewall</systemDescription>
               <systemLocation>Sant Cucat</systemLocation>
               <systemName>fw-int-cbs</systemName>
               <systemObjectId>.1.3.6.1.4.1.25461.2.3.24</systemObjectId>
               <uuid>47ef7cf1-0e3a-4081-81ac-1e9cdbfc5c7e</uuid>
            </item>
         </return>
      </node:getNodesResponse>
   </env:Body>

When I use the metadata wizzard to parse the xml seems works correctly.

nnm1.png

But when I use the  tExtractXMLField I'm getting 0 results.

2nnm1.png

nnm2.png

nnm3.png

I'm noob with Talend, any help? Thanks

 

"Ignore the namespaces" are marked in advanced settings


Accepted Solutions
Highlighted
Five Stars

Re: tExtractXMLField empty retourne

 The problem was in the loop. Should be:

 

"/node:getNodesResponse/return/item"

 

In the wizzard the source shcme have the header and body tags. The tExtractXML let you select the body field, and its why you don't need put it in the "Loop XPath query"

 

View solution in original post


All Replies
Highlighted
Five Stars

Re: tExtractXMLField empty retourne

 The problem was in the loop. Should be:

 

"/node:getNodesResponse/return/item"

 

In the wizzard the source shcme have the header and body tags. The tExtractXML let you select the body field, and its why you don't need put it in the "Loop XPath query"

 

View solution in original post

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog