Element is unexpected according to content model of parent

D

Dan The Man

Hi All,

I'm out of ideas on this one.. Here's the situation. I have this infopath
2003 SP1 Form with C# Managed Code. It contains a repeating table inside a
repeating section inside an optional section. Now, I need to duplicate the
Repeating Section inside the Optional Section. I have gotten it to work in
my application.. But something changed. I don't know what and not it is not
working. When I open a new Solution and recreate the same data Source and
code, everything works just fine. Below is the error I am getting. Do you
have any more ideas on what I should do to try and fix this problem?

Thanks in advance,

Dan

System.Runtime.InteropServices.COMException
Element
'{http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-11-11T17-28-15}TestResultsRepeatingSection'
is unexpected according to content model of parent element
'{http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-11-11T17-28-15}TestResultsOptionalSection'.

at
Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMNode.appendChild(IXMLDOMNode newChild)
at
Microsoft.Office.Interop.InfoPath.SemiTrust.DOMNodeWrapper.appendChild(IXMLDOMNode newChild)
at
Microsoft.Office.Interop.InfoPath.SemiTrust.DOMNodeWrapper.appendChild(IXMLDOMNode newChild)
at Application2.Application2.createNewSimilarTRRNode(IXMLDOMNode&
oCurrentTRRNode) in c:\work\infopath\application2\formcode.cs:line 735
at
Application2.Application2.getSimilarTestResultsRepeatingNode(IXMLDOMNode&
oCurrentTRRNode, Hashtable& htValues) in
c:\work\infopath\application2\formcode.cs:line 878
at Application2.Application2.importCSVFileFromTestResultsAttachments() in
c:\work\infopath\application2\formcode.cs:line 713
at Application2.Application2.csvFileAttachment_OnAfterChange(DataDOMEvent
e) in c:\work\infopath\application2\formcode.cs:line 659
at
Microsoft.Office.Interop.InfoPath.SemiTrust._DataDOMEventSink_SinkHelper.OnAfterChange(DataDOMEvent pDataDOMEvent)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top