That worked. Thanks.
"Christoph Schittko [MVP]" <INVALIDEMAIL@austin.rr.com> wrote in message
news:epQvmGV7EHA.1260@TK2MSFTNGP12.phx.gbl...[color=blue]
>
> Robert,
>
> The best way is to pass an XmlSerializerNamespaces object to the
> Serialize() method, as I describe in [0].
>
> You could also modify the generated class to force the namespace prefix
> when serializing instances [1], but I am generally not a friend of
> modifying generated code
> [0]
http://www.topxml.com/xmlserializer/...at_runtime.asp
> [1]
http://www.topxml.com/xmlserializer/...namespaces.asp
>[color=green]
>> -----Original Message-----
>> From: Robert Strickland [mailto:bstrickland@comporium.net]
>> Posted At: Tuesday, December 28, 2004 4:11 PM
>> Posted To: microsoft.public.dotnet.xml
>> Conversation: Xsd question
>> Subject: Xsd question
>>
>> I developed a schema that uses the following for schema settings:
>>
>> elementFormDefault="qualified"
>> xmlns:at=http://www.mycompany.com
>> targetNamespace="http://www.mycompany.com"
>>
>> The goal is to namespace the my elements with "at" - example is
>> at:myElementName.
>>
>> I use xsd to build a class. I then use the class to add data and then[/color]
> use[color=green]
>> the XmlSerializer to serialize the class. When I look at the Xml[/color]
> stream[color=green]
>> generated from the serialization, I do not see my target name space
>> prefixed
>> to the elements.
>>
>> How can I serialize and get the target namespace to appear on the Xml
>> stream
>> correctly?[/color]
>
>[/color]