namespace prefix problem

Sep 27, 2011 at 10:32 AM


i use a linq to xsd to generate xml file following the xsd

i use a xsd like

 <xsd:schema xmlns:ocm="urn:my:namespace:Catalogue:1" xmlns:xsd="" targetNamespace="urn:my:namespace:Catalogue:1" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1"








  <xsd:element name="Catalogue" type="ocm:CatalogueType"/>






 <xsd:complexType name="CatalogueType">



when i generate my xml file with the class generated with xsd to linq

I get

<?xml version="1.0" encoding="utf-8"?>
<Catalogue xmlns="urn:my:namespace:Catalogue:1">




and I would like to have the prefix namespace like

<?xml version="1.0" encoding="utf-8"?>
<ocm:Catalogue xmlns:ocm="urn:my:namespace:Catalogue:1">


How I can do this


thanks for your response


Sep 30, 2011 at 1:37 PM

Can we have a proper example Xsd please?

I don't know the answer but with an example I could have a stab.