473,412 Members | 4,594 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

XmlDocument xsi: Problem

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
Nov 17 '05 #1
1 1677
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."

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Michael H | last post by:
Hello group, I have a some xml that looks like this below: <tuneRequests ct="3" xmlns:sql="urn:schemas-microsoft-com:xml-sql" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <tr...
2
by: John Barring | last post by:
Hi All, I am new to XPath stuff. I want parse XMLDocument with XPath and find out subset of information. If you look at following xml, for i.e how can i retrieve subset information such as...
3
by: Mark Jerde | last post by:
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...
0
by: Mungo Jerrie | last post by:
Hi there I have a small problem with my namespaces: I would like to end up with this xml: <?xml version="1.0" encoding="ISO-8859-1"?> <Invoice...
3
by: Stuart Shay | last post by:
Hello All In the following XML Below which is a XMLDocument in my application. I want to remove the <extensions></extensions> Node completely. What is the best way to do this, my files are...
0
by: Ewan Fairweather | last post by:
Hi, I'm generating the below XML in c# for an asp.net application When i've generated this XML the <LaboratoryDetails xmlns=""> element has a blank xmlns set. How do i either a) remove this...
1
by: Ewan Fairweather | last post by:
Hi, I'm generating the below XML in c# for an asp.net application When i've generated this XML the <LaboratoryDetails xmlns=""> element has a blank xmlns set. How do i either a) remove this...
0
by: Baren | last post by:
Hi! All, I am facing a problem while creating a XMLDocument from a XmlSerialized Object . Here is my code and the error I am getting. Can anyone help me out. Check the attribute value of EmpID...
5
by: Alan Silver | last post by:
Hello, Sorry if this is an obvious question, but I'm not very familiar with using XmlDocument, and I am struggling with a really simple task. I couldn't find anything clear that explained what I...
3
by: 0to60 | last post by:
Please help! I'm using the following code to get an XML doc: string str = "http://api.local.yahoo.com/MapsService/V1/geocode?appid=12345&city=addison"; System.Net.HttpWebRequest request =...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.