Unfortunately the implicit conversion from string
to XName
does not parse out the namespace. You need to do this:
XName.Get("foobar", "asdf");
ChaosPandion
2010-06-28 23:57:31
Unfortunately the implicit conversion from string
to XName
does not parse out the namespace. You need to do this:
XName.Get("foobar", "asdf");
Another way you can handle namespaces is by using the XNamespace class.
XNamespace ns = "http://www.example.com/whatever";
XElement child = new XElement(ns + "base");