Re: XMLDocument to XMLNode
Dave T wrote:
I have a web service method that returns an XMLDocument. When I call it from
an aspx page, the intellisense says that the method is of type XMLNode, so
when I try, stupidly, to get the results of the web service call into an
XMLDocument in the client, it fails with the error
System.Web.Services.Protocols.SoapException: Server was unable to process
request. ---> System.InvalidCastException: Unable to cast object of type
'System.Xml.XmlElement' to type 'System.Xml.XmlDocument'.
Does anyone know where I might find out more about this?
As the error message says what the web service returns is an XmlElement
not an XmlDocument. If you want to access an XmlDocument take that node
and use its OwnerDocument property which is of type XmlDocument.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
.
Relevant Pages
- Re: Removing default xmlns from xml
... I still get the same error message ... XmlNamespaceManager nsm = new XmlNamespaceManager; ... In this case, I have a XMLDocument. ... > myself and I think that Mark's suggestion should work fine for you. ... (microsoft.public.dotnet.languages.csharp) - Loading XML file into XMLDocument
... I've been dealing for hours trying to figure out why do I get the ... XmlDocument xmlDoc= new XmlDocument; ... the method works just fine (it opens the xml file and ... i get the error message shown ... (microsoft.public.dotnet.xml) - RE: DataSet - XMLDocument
... error message is at line DataGrid1.DataBind; ... > I am getting a xml STRING which i am loading into a XMLDOCUMENT. ... > Is there any other way to Bind to a repeater from XmlDocument? ... (microsoft.public.dotnet.framework.aspnet) - Compilation Error :placement arguments not allowed?
... I've created MFC Application using Visual Studio 2003, ... XmlDocument *xmlDoc = new XmlDocument; ... and compile this error message appeared: ... ISAPI Filter DLL project and used XmlDocument ... (microsoft.public.dotnet.languages.csharp) - Re: How do I pass a message or variable to a web service?
... "Are you sure that your web service project has been re-built and than your ... web service reference has been refreshed?" ... public XmlDocument GetDataFromDB ... (microsoft.public.dotnet.framework.webservices) |
|