473,395 Members | 2,079 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,395 software developers and data experts.

xml schemalocation

I'm trying to generate a schemalocation entry on my root node when using the
xmlserializer.serialize method. I have been unable to achieve this. Is
there a certain attribute I need to be applying to my root node class for
that to appear? Any help is appreciated.

Lance Johnson
Nov 12 '05 #1
2 1639
How about:

public class Test

{

[XmlAttribute("schemalocation")]

public string Location;

}

"Lance Johnson" <lj******@docs.com> wrote in message
news:ud**************@TK2MSFTNGP14.phx.gbl...
I'm trying to generate a schemalocation entry on my root node when using the xmlserializer.serialize method. I have been unable to achieve this. Is
there a certain attribute I need to be applying to my root node class for
that to appear? Any help is appreciated.

Lance Johnson

Nov 12 '05 #2
Jut
1
Hallo,

I actually fight with nearly the same problem but with one additional constraint:

the attribute schemaLocation of my root element has to be called xsi:schemaLocation. Unfortunately, the compiler causes an Exception due to the ":"
Can anyone help me?

Thanks a lot in advance :)

Jut
May 4 '06 #3

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

Similar topics

1
by: Naresh Agarwal | last post by:
Hi I'm using SAX Parser of Xerces Java v2.4.0 for XML Parsing. I want to perform schema validations on the xml. The problem is that root element of XML document does not have...
1
by: John | last post by:
I have an input document that contains a large base64 encoded document. This document also declares a schema location in the root element. I want to write an XSL stylesheet that makes an exact...
0
by: Sarah Tegtmeier | last post by:
Hi I have a question about the correct use of the attribute xsi:schemaLocation. My programm has to process XML files where the value of this attribute causes some problems. The programm is...
0
by: Ron James | last post by:
I'm developing a GUI application in C#. I have a schema file (.XSD) and am able to serialize and deserialize the applications data using the schema file to an .XML file. (I'm using xsd.exe to...
0
by: davea | last post by:
I am trying to validate an XML instance document that contains elements from 2 different schema's. When I validate using .net I get the following error "Xml is invalid: The element...
2
by: kaush | last post by:
Hi all, I am trying to serialize a C# object into a XML document using "XmlSerializer" class. One of the elements of the XML document needs a "xsi:schemaLocation" attribute. I am not sure how to...
1
by: techie | last post by:
Hi, I am using an xml schema (Schema1.xsd) which refers to two other Schemas as follows. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:plcm-s="http://www.mycompany.com/plcm"...
2
by: grochmal | last post by:
I am trying to use XmlSerializer to serialize a class I have created specifically for generating an XML file. The problem is that the XML file must contain a xsi:schemaLocation attribute in my...
1
by: Marvin Massih | last post by:
I've searched the entire MSDN documentation and Google, but I just don't find a solution: I have an .xsd file from which I had xsd.exe create classes. How can I make the XmlSerializer write the...
0
by: =?Utf-8?B?Um9iaW5N?= | last post by:
Hi, I'm re-writing my WSDLs to remove the port number using a SoapExtensionReflector derived class. The ports are redirected at our firewall so they're not required in the WSDL. Here's my code:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.