Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - xpathnavigator.setvalue error >Thread Next - Re: xpathnavigator.setvalue error Re: xpathnavigator.setvalue errorTo: NULL Date: 1/16/2009 2:45:00 PM John S wrote: > Using VB 2005 I'm getting -"Specified method is not supported" when I try to > use the xpathnavigator.setvalue method. > > Can anyone explain? You need to create an XPathNavigator over an XmlDocument/XmlElement if you want to be able to use editing features like SetValue. An XPathNavigator over an XPathDocument is readonly. So this works: XmlDocument doc = new XmlDocument(); doc.LoadXml("<foo>bar</foo>"); doc.DocumentElement.CreateNavigator().SetValue("baz"); doc.Save(Console.Out); -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
