cancel
Showing results for 
Search instead for 
Did you mean: 

Need capture value of a filed from XML

Reddy4417
Explorer
0 Kudos
266

Dear All,

Good day, i hope your doing well.

i have a requirement to capture only value of a filed from the input data to recevier system.

i have used xpath, filter condition and some script but no luck.

here is the sample input format

need only value of fileData, as below

1234sdjahffbccojadsdqhwsSNsnsJDFADHADS

quick help appriciated.

BR,

Chinnu

Accepted Solutions (1)

Accepted Solutions (1)

MortenWittrock
SAP Mentor
SAP Mentor

Hi Chinnu

The reason your attempts so far haven't worked is very likely the namespaces in the document. A quick and dirty way around that is this:

//*[local-name() = 'fileData']

Use this XPath expression in a Content Modifier to store the value in a property.

The more elaborate way is to declare the namespaces in your iflow's runtime configuration, and then use the namespace prefixes in the XPath expression. But in this case, the above will also work.

(It only works if there is exactly one fileData element in the document, but that does seem to be the case.)

Regards,

Morten

Reddy4417
Explorer

Hello Morten Wittrock,

this worked perfectly , thanks for your help and time.

BR,

Chinnu.

Answers (1)

Answers (1)

Reddy4417
Explorer
0 Kudos
Hello 7a519509aed84a2c9e6f627841825b5a,

thanks for your time..

please find the source xml below.


<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<SignDocResponse xmlns="http://tempuri.org/">
<SignDocResult xmlns:a={{actual url}} xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Message>file successfuly signed</a:Message>
<a:Success>true</a:Success>
<a:fileData>4nGVRTW+DMAz9Kz5uB+QkECBSVakfQ+uhHaJom4Q4BMgQ0xYqSKvu3y8BdZs0X2I7fs/vJZT4QEDEQKMIKAXGCSwWmOR47FrM7w7yYhPN44gQSZQXVfGbF8S88UQcCE/WMoyYEFVMg3t8BhFYtgwToD7D/OukcKV1b/B4royrXrqmVQYzVZvCZwLCGAI/AhGWuErt3gNQwhzFcomp0+PYtpm9eX2q3i3Kacv2dorOUy6c4GlX0uvfVa5DcS1HNbUf1cdFma6W+KDrvul0a8XolR67Wz0Tbeyw0mYEOunAzdCf1v21ILbigkMcsBL3qunkv24qB4sEFk7ATI39eajV6CRbUncQK5vPpmzOgP94Hfr6qEyB6TbBXF0N7j5lq3blH99kCp8DDW7eMeuNNArI7D+1kPnBx4JOH5uV1tU3xR+I3AplbmRzdHJlYW0KZW5kb2JqCjEwNSAwIG9iago8PC9MZW5ndGggODAvRmlsdGVyL0ZsYXRlRGVjb2RlL1NpemUgMTA2L1Jvb3QgMzAgMCBSL0luZm8gMjggMCBSL0lEIFs8ZTg3MTdlYzIxN2I1YjY0MTlmZmIyODBlY2NkZjI3NjQ+PGZiNGNlNGVjODYwYWQ3NTJjMzkyOTYxMTRhYmEyYmY2Pl0vV1sxIDMgMl0vVHlwZS9YUmVmL0luZGV4WzAgMSAxMSAxIDE2IDEgMjggMSAzMCAxIDk0IDEyXS9QcmV2IDEwNTQ5ND4+c3RyZWFtCnicY2BgYPj/n4mBIYOBiZHxeS0DAyPjs0YQ+fk5iJxbBSLv3QKR9ztB5EOgGrB6RkbGR29BIo/ngMgnU0Hk0/VQWSD7ywMGMPj/HwCpuxe/CmVuZHN0cmVhbQplbmRvYmoKJWlUZXh0LTUuNS4xMwpzdGFydHhyZWYKMTI4NjQxCiUlRU9GCg==</a:fileData>
</SignDocResult>
</SignDocResponse>
</s:Body>
</s:Envelope>


BR,
Chinnu.