Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

How do I give same namespace for different Infopath forms ?

Question posted by: Anni (Newbie) on July 8th, 2008 11:14 AM
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: ( text )
  1. <?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"?>
  2. <?mso-application progid="InfoPath.Document" versionProgid="InfoPath.Document.2"?>
  3. <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"
  4. xmlns:xd="http://schemas.microsoft.com/office/infopath/2003">
  5.   <my:Navigation>
  6.   </my:Navigation>
  7.   <my:chkCBC>
  8.   </my:chkCBC>
  9.   <my:txtLevel>112</my:txtLevel>
  10.   <my:txtHctLevel>211</my:txtHctLevel>
  11.   <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: ( text )
  1. XmlDocument xDoc = new XmlDocument();
  2.  xDoc.Load(@"c:\text.xml");
  3.  XmlNamespaceManager nsmgr = new XmlNamespaceManager(xDoc.NameTable);
  4. 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...
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
Reply
Not the answer you were looking for? Post your question . . .
183,906 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
Top XML Forum Contributors