• 11Aug

    Today I wanted to use a simple XPATH function in my orchestrationto find the maximum value of a sequence number in a set of nodes. So I booted up XMLSpy and loaded the xml schema. Simple problem, simple solution:

    max(//sequence_nr)

    Wrong.. biztalk does not support xpath 2.0. Even worse, I cannot even program a helper function since .NET 3.5 does not support XPATH 2.0. This was kind of hard to verify since msdn states something different.

    Since my records are ordered, luckily I could also pick the last record. Which resulted in the uglier xpath statement:

    string(//record[count(//record)]/sequence_nr)

    That the actual statement was a lot longer since it had namespaces and some subnodes. And I really don’t see how I could do this in xpath when the records were not sorted.

    This post in microsoft connect I found acknowledges that xpath 2.0 is still not supported in .Net framework 3.5

    I hope they will manage to fit support in framwork version 4.0

    • Print
    • Digg
    • del.icio.us
    • Facebook
    • Google Bookmarks
    • LinkedIn
    • Twitter
    • Live
    • DotNetKicks

    Posted by Pim @ 23:13

    1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...

    Tags: ,

One Response

WP_Cloudy
  • bhagiratha1984 Says:

    Hi,
    I have an XML files with repeated records say

    nyc

    nyc1

    nyc2

    now i want to get the value of last occurance of Hello node i.e. nyc2 using XPath in Expression shape.
    Can it be done ??

    Regards
    Joon

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.