473,785 Members | 2,878 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:noNamespace SchemaLocation= "TestCaseSchema _03.xsd">

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

<TestCase xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
noNamespaceSche maLocation="Tes tCaseSchema_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:noNamespac eSchemaLocation ="" xmlns:d1p1="Tes tCaseSchema_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 1700
Hi Mark,

I have posted a reply on another thread in microsoft.publi c.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
1765
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 xsi:type="trGenericType" number="2">
2
4023
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 'EnrollmentState','SCGProductCollection' or 'EnrollmentEntities'. I have no idea how to parse following XML <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3
6751
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 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...
0
1764
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 xmlns="http://rep.oio.dk/ubl/xml/schemas/0p71/pip/" xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/" xmlns:main="http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/"
3
3023
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 not that large Thanks Stuart
0
2027
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 attribute or b) prevent it from happening in the first place. To generate the xml I've got two template files which i've included at the bottom of this post. Two xmldocuments are created in my code which load the
1
2997
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 attribute or b) prevent it from happening in the first place. To generate the xml I've got two template files which i've included at the bottom of this post. Two xmldocuments are created in my code which load the
0
1041
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 it say \"137904\". How can we ignore the "\"? Code : string aXmlString; XmlSerializer xmlSerializer = new
5
2335
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 want to do. Suppose I have an XmlDocument like this... <books> <number>3</number>
3
4138
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 = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(str); request.Credentials = System.Net.CredentialCache.DefaultCredentials;
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10329
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10152
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10092
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8974
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7500
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.