Show XML Path - InfoPath Dev
in

InfoPath Dev

Show XML Path

Last post 06-19-2007 05:10 AM by Coita Thierry. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-19-2007 12:41 AM

    Show XML Path

    Hi,

    Lots of people ask me if it's possible to put the path of the xml (loaded in Infopath) in the an expression box without using code?

     Did you know a way?

    Thanks

    Thierry

    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 06-19-2007 01:29 AM In reply to

    Hi Thierry,

    I'm not sure I understand this question.  If you click on the function button of an expression box you should be able use the Data Source tree control to pick the field that you want to show in the expression box.

    This is pretty simply, am I missing something?

    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 06-19-2007 01:40 AM In reply to

    Hi Matt,

     Thanks for your reply!

     What I want to show is where the XML is locate on the disk for example that can be:

     c:\Forms\Data\XML\myform.xml

     Is there a way to make an XPath Expression for show this?

     I know how to do with code but without is there a way?

     Thanks

     P.S. Have you receive my mail? Is it possible to meet us?

    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 06-19-2007 02:04 AM In reply to

    Hi Thierry,

    I don't think this will be possible with just an XPath.  The path is not stored anywhere in the XML.  The best I can do for you is give the filepath where the form template is saved.  That's in the PIs, so you can access it with XPath.  Try adding an expression box to a template with this XPath:

    substring-before(substring-after(/processing-instruction()[local-name(.) = "mso-infoPathSolution"], 'href="'), '"')

    You can expand to reference anything in the PIs, so you can extract all the information from there, but I don't think the location of the XML file will be there!

    PS - Yes, I have replied just last night - check your Inbox in the top right corner of the page.  We should continue in regular e-mail to make the notification much easier to see!

    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 06-19-2007 05:10 AM In reply to

    Ok thanks for your answer that confirm what I think.

     So code is the only way...

     ++

    Thierry

     P.S. I have see your mail I will see what is the best and send you a answer to your e-mail address soon.

    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.