OZONE Asylum
Forums
Server-Side Scripting - Oh my!
XML attribute issue
This page's ID:
27808
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
I'm not sure if this is an XML problem I have or C# or what, so if any MadSci feels like moving it, go ahead. I have the following snippet (C#, same problem in 1.1 and 2.0): [code] XmlDocument xd = new XmlDocument(); XmlElement xe1 = xd.CreateElement("someXmlDoc"); xe1.SetAttribute("xsi:noNamespaceSchemaLocation", "C:\\schemas\\someXmlDoc.xsd"); xe1.SetAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); xd.AppendChild(xe1); string text = xd.DocumentElement.OuterXml; [/code] The problem is that "text" looks like: [code] "<someXmlDoc noNamespaceSchemaLocation="C:\schemas\someXmlDoc.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />"[/code] The "xsi:noNamespaceSchemaLocation" atribute doesnt have the "xsi:" in it anymore... If I use something other than "noNamespaceSchemaLocation", it still loses the "xsi:" Any idea where it went or what happened? I've done a little bit of searching around, but nothing has turned up yet. -- Any sufficiently advanced bug is indistinguishable from a feature.
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »
Maximum Security
OZONE
DHTML/Javascript
Server-Side Scripting - Oh my!
CSS - DOM - XHTML - XML - XSL - XSLT
Stupid Basic HTML
Visual Therapy
Photoshop
Photoshop Pong, Anyone?
***WARNING*** BIG SIG APPROACHING
Photography
3D Modelling & Rendering
Multimedia/Animation
Print Graphics
Holding Pens
Philosophy and other Silliness
Outpatient Counseling
Site reviews!
Mad Scientists' Laboratory
Getting to know the Grail