|
Home > Archive > BizTalk Server Orchestration > December 2004 > xpath question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Carlos 2004-12-16, 6:49 pm |
| I'm calling a web service within my orchestration that returns a xml.document.
This is what it returns:
<?xml version="1.0" encoding="utf-8" ?>
- <MainFrameOutput>
<Field>PASSED SECURITY</Field>
<Field>INFO - SIGNON ACCEPTED</Field>
</MainFrameOutput>
But depending on the message, it could have more "Field" nodes. Now I'm
thinking I'll be using a loop and getting the childnode count to control the
loop. But how do I get the value in the "Field" node.
I've tried "varstring = xpath(msg, "string(/*/field[1])");". But it
returns a space.
--
Carlos
| |
| Matt Meleski 2004-12-16, 6:49 pm |
| Did you try :
xpath(msg, "string(//Field[1])");
Or
xpath(msg, "string(Field[1])");
In your message your elements are called -> Field but in
your xpath it is -> field
Maybe just a typo but the statments are case sensitive.
Also look here for some xpath examples :
http://msdn.microsoft.com/library/d...athexamples.asp
Matt.
"Carlos" wrote:
> I'm calling a web service within my orchestration that returns a xml.document.
>
> This is what it returns:
>
> <?xml version="1.0" encoding="utf-8" ?>
> - <MainFrameOutput>
> <Field>PASSED SECURITY</Field>
> <Field>INFO - SIGNON ACCEPTED</Field>
> </MainFrameOutput>
>
> But depending on the message, it could have more "Field" nodes. Now I'm
> thinking I'll be using a loop and getting the childnode count to control the
> loop. But how do I get the value in the "Field" node.
>
> I've tried "varstring = xpath(msg, "string(/*/field[1])");". But it
> returns a space.
>
> --
> Carlos
| |
| Carlos 2004-12-16, 6:49 pm |
| Thank you so much. I tried the first one and it worked.
"Matt Meleski" wrote:
[vbcol=seagreen]
> Did you try :
>
> xpath(msg, "string(//Field[1])");
>
> Or
>
> xpath(msg, "string(Field[1])");
>
>
> In your message your elements are called -> Field but in
> your xpath it is -> field
> Maybe just a typo but the statments are case sensitive.
>
>
> Also look here for some xpath examples :
>
> http://msdn.microsoft.com/library/d...athexamples.asp
>
> Matt.
>
> "Carlos" wrote:
>
| |
| Neal Walters 2004-12-21, 5:51 pm |
| I think your first post might have worked if you changed the lower case f to
upper case F.
Neal Walters
http://Biztalk-Training.com
"Carlos" wrote:
[vbcol=seagreen]
> Thank you so much. I tried the first one and it worked.
>
> "Matt Meleski" wrote:
>
|
|
|
|
|