> One quick question, right now with this it works, but by default the
> program is creating a namepsace of 'p7', is there a way, I can force
> the p7 to a different name say csharp?
It is creating an *alias* of p7 because you haven't added the xmlns
attribute to the root. Note that my example doesn't generate any p7,
p2, etc - unless I drop the line:
new XAttribute(XNamespace.Xmlns + "test", ns),
Include a similar line, aliasing your namespace as whatever (where
I've aliased as "test") and you should be sorted. If you have
problems, can you post a short but complete example? (since the code
works "as posted", we'd need to look at what is different...)
Marc
CSharper - 20 May 2008 15:22 GMT
> > One quick question, right now with this it works, but by default the
> > program is creating a namepsace of 'p7', is there a way, I can force
[quoted text clipped - 11 lines]
>
> Marc
Thanks, I was missing the alias.