Connecting Tech Pros Worldwide Forums | Help | Site Map

XmlDocument xsi: Problem

Mark Jerde
Guest
 
Posts: n/a
#1: Nov 17 '05
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.x sd">

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



Kevin Yu [MSFT]
Guest
 
Posts: n/a
#2: Nov 17 '05

re: XmlDocument xsi: Problem


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."

Closed Thread