Parse Xpath? - InfoPath Dev
in

InfoPath Dev

Parse Xpath?

Last post 11-22-2011 07:44 AM by canadiense. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-22-2011 05:40 AM

    Parse Xpath?

    I am attempting to copy a repeating table pulled from a web service query to a local repeating table and I believe the xpath syntax to my web service is incorrect.  Wondering if someone can help. :)

     

    Here are the first few lines:

    DataSource sapList = this.DataSources["ZOLP_CHECK_DUPLICATE_ADDRESS"];

    XPathNavigator sapLineItem = sapList.CreateNavigator().SelectSingleNode("//dfs:dataFields/tns:ZOLP_CHECK_DUPLICATE_ADDRESSResponse/OPEN_NOTIFS_T", NamespaceManager);

    XPathNodeIterator sapCodes = sapLineItem.Select("./dfs:item", NamespaceManager);

     

    Later on in the code I have the line that is supposed to update the local field with the web service field:

    onlineItem.SelectSingleNode("my:Dupes_Account", NamespaceManager).SetValue(sapCode.SelectSingleNode("dfs:QMNUM", NamespaceManager).InnerXml);

     

    Is anything awry here? There must be something - it's not working! :( No errors though.

     

    Thanks!

    Chris.

    Chris ... er, Arthur Fonzarelli!
  • 11-22-2011 06:05 AM In reply to

    I think it's unlikely that the item node has the dfs namespace.  That's probably the problem here.  Wouldn't hurt to walk through the code in the debugger to see what it's doing.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-22-2011 07:22 AM In reply to

    What other options can I try as a preface to the item folder?

    Here's a shot of the web service:

     

    Thanks! :)


    Chris ... er, Arthur Fonzarelli!
  • 11-22-2011 07:37 AM In reply to

    It looks like it doesn't have a prefix.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-22-2011 07:44 AM In reply to

    Yer a genius! Works beautifully now if I simply remove the prefix!!! What's your poison? What can I send you?
    Chris ... er, Arthur Fonzarelli!
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.