Load xml with xsi:nil in a IXMLDOMDocument - InfoPath Dev
in

InfoPath Dev

Load xml with xsi:nil in a IXMLDOMDocument

Last post 04-20-2006 12:13 AM by Patrick Halstead. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-19-2006 01:22 AM

    Load xml with xsi:nil in a IXMLDOMDocument

    Hi,

    I have some problem to load an xml (string) in my IXMLDOMDocument. It's probably a problem of namespace but I don't know how to solve it!

    what I try to make:
    IXMLDOMDocument AVxml = (IXMLDOMDocument)thisXDocument.CreateDOM(); 
    AVxml.loadXML("<AV xmlns='' xmlns:tsd=
    'http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition'
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
    <AVel >
    <Title>Statutendatum</Title>
    <Date xsi:nil='true'/>
    </AVel>
    </AV>");

    I have try with IXMLDOMDocument3:
    IXMLDOMDocument3 xmldoc = (IXMLDOMDocument3)thisXDocument.CreateDOM();
    xmldoc.setProperty("SelectionNamespaces",
    "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"");
    xmldoc.loadXML(...);


    But same result! This make me an error of parsing (see in debug mode with Visual studio):
    quote:
    - parseError = {Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMParseErrorWrapper}
    errorCode = -1072897995
    reason = "the xsi:nil attribut on « Date » element isn't
    valid.\r\n"

    I don't understand how to make for add the namespace if it's really this? Have you any idea?

    My primary schema accept this! Because if I try to make a preview with Data file infopath accept and I can see the result!

    So what I can make for correct this?

    Thanks a lot

    ++

    Thierry
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 04-19-2006 07:46 AM In reply to

    Re: Load xml with xsi:nil in a IXMLDOMDocument

    yeah

    I have found infopath try to validate the document on parse (with which I don't know).

    If you put:
    AVxml.validateOnParse = false;


    that make no more error!

    ++

    Thierry
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 04-19-2006 11:07 PM In reply to

    Re: Load xml with xsi:nil in a IXMLDOMDocument

    Hi Thierry,
    Wow!!! That's a total trick and completely undocumented. Office 2007 won't support MSXML but I suppose there's an analog method in System.XML.
    Patrick Halstead
    Project Manager at Qdabra
  • 04-19-2006 11:29 PM In reply to

    Re: Load xml with xsi:nil in a IXMLDOMDocument

    Hi Patrick,

    Nice to hear you!

    You are already work with 2007? I have seen a lot of demonstration but I have never try to work with! I'm very impatient to see with my own hand!
    For XMLDocument in System.Xml by default he don't try to validate you must say that he must doing this with a XMLValidationReader! I so happy that infopath 2007 implement system.xml no more conversion with webservice!!!

    I was thinking that is a namespace issue and I have search on this but that was not this! What I'm always asking me is with which schema he try to validate??? My primary schema accept nil on this element!

    In februar I was in Paris for see a demo of office 2007 and a guys says that infopath 2007 can support User control (ascx) in this version. But 2 weeks ago, when I was in TechDays in Geneva the guys haven't hear nothing about that!

    Have you any information about this?

    And other question:With office 2007, are you still working with Jscprit or now you are working with .Net?

    ++

    Thierry
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 04-20-2006 12:13 AM In reply to

    Re: Load xml with xsi:nil in a IXMLDOMDocument

    Hi Thierry,
    So good to hear from you too! How's the Swiss alpine wilderness treating you? Yes, COM controls are supported in IP2007. We plan to release several in the next 2-3 months. Would you like to work on some? Send me e-mail! We'd love to have your expertise here.

    Jscript doesn't work in Office Forms Server - you must use .NET. It is supported for backward compat on the rich client, but not in mobile or in the new Form Server.
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.