Not sure why it isn't working, but I suspect that it's a namespace issue. You
could try loading the XML without the attribute, and then afterwards use
"setAttribute" to set the attribute and its value. Do something like the
following after the loadXML:
((IXMLDOMElement)AVxml.selectSingleNode("//Date")).setAttribute("xsi:nil",
"true");
---
S.Y.M. Wong-A-Ton
> Hi,
>
[quoted text clipped - 25 lines]
>
> Thanks a lot
DolceVita - 10 Apr 2006 07:01 GMT
Hi,
Thanks for this!
++
Thierry
DolceVita - 18 Apr 2006 14:13 GMT
Hi,
Your idea is good but that don't satisfy me for a lot of reason!
I don't want to change my xml 20 times before and after the load in the
IXMLDOMDocument. It's not really good for the performance of my form.
I Have seen in debug mode (Visual studio 2005) when I try to load this
XMLDocument in my IXMLDOMDocument:
- parseError =
{Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMParseErrorWrapper}
errorCode = -1072897995
reason = "the xsi:nil attribut on the « Date » element isn't
valid.\r\n"
So how I can correct this? I need to declare a namespace in my
IXMLDOMDocument before load the other XML ?
Thanks in advance