XmlDocument xsi: Problem

M

Mark Jerde

I've been looking through MSDN, books and googling for a couple hours but
haven't found the solution yet. I'm using CSharp in VS .NET 2003.

I'm trying to use XmlDocument to save XML files that are valid to a schema
I've developed. I want the root element to look like this:

<TestCase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="TestCaseSchema_03.xsd">

I've tried several variations of XmlElement.SetAttribute() and "
XmlAttribute att = [XmlDocument].CreateAttribute() " The closest I've
gotten to the desired output is (notice the missing "xsi:"):

<TestCase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
noNamespaceSchemaLocation="TestCaseSchema_03.xsd">

Many of the things I've tried look more or less like this:

<TestCase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
d1p1:noNamespaceSchemaLocation="" xmlns:d1p1="TestCaseSchema_03.xsd">

I guess I don't understand DOM well enough to know why these are the
results. Any help will be greatly appreciated!

Thanks.

-- Mark
 
K

Kevin Yu [MSFT]

Hi Mark,

I have posted a reply on another thread in microsoft.public.dotnet.xml
group.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 

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