locked
Xml.Dom.Document.saveToFileAsync does not fail upon faulty namespaced attributes

    Question

  • I have a custom namespace in my XML Document, which the WinRT XML functions seem to treat as invalid/unknown

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <ns2:Root xmlns:ns2="http://www.xxxx.xxx/schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cbv="http://yyy.yyy/schema"><Item zip="1111" cbv:comment="new comment"></Item></ns2:Root>

    If I create this XML in memory and write it to a file using saveToFileAsync it will stop writing the file after "Item zip='1111'" and not go into the error handler of the promise.

    First of all, other XML Engines do not have a problem with the given XML. Its valid. Secondly when I call getXml() on the document I do get a failure for the cbv:comment positioned attribute. 

    Any ideas what's wrong here?

    Tuesday, July 22, 2014 11:40 PM

All replies

  • Please show the code you're using to write this to file.


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.


    Friday, July 25, 2014 1:31 PM
    Moderator