xpath question
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Orchestration > xpath question




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    xpath question  
Carlos


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-16-04 11:49 PM

I'm calling a web service within my orchestration that returns a xml.documen
t.

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





[ Post a follow-up to this message ]



    RE: xpath question  
Matt Meleski


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-16-04 11: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.docum
ent.
>
> 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 t
he
> 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





[ Post a follow-up to this message ]



    RE: xpath question  
Carlos


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-16-04 11: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:
> 





[ Post a follow-up to this message ]



    RE: xpath question  
Neal Walters


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-21-04 10: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:
> 





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:59 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register