XDocument help

Soldato
Joined
27 Sep 2004
Posts
11,191
Location
The Ledge Beyond The Edge
Hi,

I am trying to create an xmls file that is formatted as
Code:
<ns0:OCUK xmls:ns0="http://ocuk>
...
</ns:OCUK>

i can get the second part, but not the initial ns0:OCUK

What i have is
Code:
XNamespace ns0 = XNamespace.Get("http://ocuk");
XDocument d = new XDocument(
          new XElement("OCUK",                                
          new XAttribute("ns0", ns0),));

What this gives me is

Code:
<ns0 ns0="http://OCUK">
...
</nso>
how can i get the OCUK after the initial colon? It's killing me lol

I had it done in VB quite easily, but converting it to c# is being a right PITA.

Cheers
 
Back
Top Bottom