How do I give same namespace for different Infopath forms ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Anni
    New Member
    • Jul 2008
    • 1

    #1

    How do I give same namespace for different Infopath forms ?

    Hi,
    Can anyone please tell me how do I give same namespace for different infopath forms.?
    I have an XML formed by an infopath form, the XML is :

    Code:
    <?mso-infoPathSolution name="urn:schemas-microsoft-com:office:infopath:PublishedDiagnosticTests:-myXSD-2008-06-13T05-43-58" solutionVersion="1.0.0.75" productVersion="12.0.0.0" PIVersion="1.0.0.0" href="http://sharepointqtc:8558/formservertemplates/PublishedDiagnosticTests.xsn"?>
    <?mso-application progid="InfoPath.Document" versionProgid="InfoPath.Document.2"?>
    <my:DiagnosticTests xml:lang="en-US" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2008-06-13T05:43:58" 
    xmlns:xd="http://schemas.microsoft.com/office/infopath/2003">
      <my:Navigation>
      </my:Navigation>
      <my:chkCBC>
      </my:chkCBC>
      <my:txtLevel>112</my:txtLevel>
      <my:txtHctLevel>211</my:txtHctLevel>
      <my:chkwnl>.....................
    Here xmlns:my="..... .." namespace has a timestamp, this timestamp changes for all forms.
    Initially I had one infopath form so I had hardcoded the schema as :

    Code:
     XmlDocument xDoc = new XmlDocument();
     xDoc.Load(@"c:\text.xml");
     XmlNamespaceManager nsmgr = new XmlNamespaceManager(xDoc.NameTable);
    nsmgr.AddNamespace("my", "http://schemas.microsoft.com/office/infopath/2003/myXSD/2008-05-30T11:06:54");
    but now i have multiple infopath forms..so how do i set a default namespace which would work for all infopath forms.

    Thanks...
Working...