XML datasource question
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2007
03:38 PM
11-12-2007
03:38 PM
XML datasource question
Hello,
I have a response in which one of the element has an XML. So an XML within an XML. I need to know how I can use XML datasource step to populate my datasource with this embedded XML. below is the response I get. The element with the embedded XML is 'XMLResponse'.
<ApiResult><Results><Result>True</Result><ErrorCode/><Messages><Message/><MessageId>f81ae5ae-43a0-4510-8326-1f1dc1cd2372</MessageId></Messages></Results></ApiResult>
I have a response in which one of the element has an XML. So an XML within an XML. I need to know how I can use XML datasource step to populate my datasource with this embedded XML. below is the response I get. The element with the embedded XML is 'XMLResponse'.
3 REPLIES 3
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2007
05:04 PM
11-12-2007
05:04 PM
Hi Ali,
try transferring the content of the XmlResponse element to a properties-step property, and then setting that property as the source property in your DataSource..
regards!
/Ole
eviware.com
try transferring the content of the XmlResponse element to a properties-step property, and then setting that property as the source property in your DataSource..
regards!
/Ole
eviware.com
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2007
10:56 AM
11-13-2007
10:56 AM
Hi Ole,
I trasfered XMl response in Property Trasfer step as a [source] and target is [Properties] where I want to get each element seperately from XML response .
when I tried to do I am getting error message
Tue Nov 13 10:43:43 PST 2007 XmlResponse [error: Unexpected end of file after null]
Trasfers -
XMlResponse
Here is source steps :
declare namespace ns1='http://services.aaaa.com/v3/smsmessage';
//ns1:CreateMessageUsingPhoneResponse/ns1:CreateMessageUsingPhoneResult/ns1:XmlResponse
Here is target steps :
//ApiResult[1]/Results/Messages/MessageId
I trasfered XMl response in Property Trasfer step as a [source] and target is [Properties] where I want to get each element seperately from XML response .
when I tried to do I am getting error message
Tue Nov 13 10:43:43 PST 2007 XmlResponse [error: Unexpected end of file after null]
Trasfers -
XMlResponse
Here is source steps :
declare namespace ns1='http://services.aaaa.com/v3/smsmessage';
//ns1:CreateMessageUsingPhoneResponse/ns1:CreateMessageUsingPhoneResult/ns1:XmlResponse
Here is target steps :
//ApiResult[1]/Results/Messages/MessageId
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2007
04:45 PM
11-13-2007
04:45 PM
You may want to try using
Row XPath as //ApiResult[1]
and declaring each column with the exact path:
/Results/Messages/MessageId
to get each xml value
Row XPath as //ApiResult[1]
and declaring each column with the exact path:
/Results/Messages/MessageId
to get each xml value
