the output the i need is
<ns1:collection>
<ns1:child1>value1</ns1:child3>
<ns1:child2>value2</ns1:child3>
<ns1:child3>value3</ns1:child3>
</ns1:collection>
i try to do it by the code below - but i get an exception -...
How to add the namespace on this one ??
XDocument xDoc = new XDocument( new XElement( "collection",
new XElement( "ns1:child1", value1 ),
new XElement( "ns1:child2", value2 ),
new XElement( "ns1:child3", value3 ) ) );
I also try to use the
XNamespace ns1 = "http://url/for/ns1";";
and to do
( ns1 + "child1", value1 )
And still nothing