Is there any method for removing processing instructions? - InfoPath Dev
in

InfoPath Dev

Is there any method for removing processing instructions?

Last post 06-24-2007 02:37 AM by Caeanis. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-22-2007 04:14 PM

    Is there any method for removing processing instructions?

    I have a form that I'm using to generated xml doc for a nowledge base. I programmatically insert a stylesheet processing-instruction to reference a style sheet to make the docs readable in the browser, but the 2 processing instructions inserted by Infopath pointing to it as the application is causing me no small amount of grief.  How can I delete those via jscript?   The nodes in question are :

    <?mso-infoPathSolution solutionVersion="1.0.0.57" productVersion="11.0.8034" PIVersion="1.0.0.0" href="url" name="urn:schemas-microsoft-com:office:infopath:kb:" ?>
    <?mso-application progid="InfoPath.Document"?>

     How can I remove these instructions via jscript so that I can open them in the browser when they are clicked on?  I know I can do it manually but there should be a way to automate that when the forms are saved...  Any help would be appreciated.

  • 06-22-2007 04:52 PM In reply to

    Re: Is there any method for removing processing instructions?

    Ok, I think I found out how to reference the nodes using:

    var objNode=XDocument.DOM.selectSingleNode("/processing-instruction('mso-infoPathSolution')");

     based on the post "Accessing Processing Instructions via XPath" by Matt Faus, (thanks Matt!).  Now how do I delete this node? 

     

  • 06-24-2007 02:37 AM In reply to

    Re: Is there any method for removing processing instructions?

    I figured out a way to do this, the previous method was specific to jscript.  The following is my method for doing so in BLOCKED SCRIPT
     

    Dim objNodeList
    Set objNodeList = XDocument.DOM.selectNodes("/processing-instruction()")
     objNodeList.removeAll
     

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.