Re: Parsing XML strings
Tech-Archive recommends: Fix windows errors by optimizing your registry
Just did that. Here's what I did to retrieve the account_number and
reply_code fields from the xml string. Hope it helps.
Dim doc As New XmlDocument
doc.LoadXml(xmlString)
Dim actNbr As XmlNodeList = doc.GetElementsByTagName("account_number")
Dim replyCode As XmlNodeList = doc.GetElementsByTagName("reply_code")
MessageBox.Show("Account: " & actNbr(0).InnerText)
MessageBox.Show("Reply code: " & replyCode(0).InnerText)
almurph@xxxxxxxxxxxxx wrote:
Hi,
I have XML data in a string format and want to extract the content
and parse it. Can anyone suggest any methods/techniques/ways to do this
please?
Any comments/suggestions/code-snippets much appreciated.
Al
The XML newbie
.
Relevant Pages
- Re: Stream.Write / Encoding problem
... I would test converting xml string to base64 and sending that then ... request and you at least has a starting point. ... > request stream and write my XML string to it. ... (microsoft.public.dotnet.framework) - Re: XML parsing in C#
... to parse the sample XML have I to loop through the entire XML string ... by using the SelectNodes of the XmlDocument? ... >> could anyone tell me how to parse this xml in a XmlReader or XmlDocument ... (microsoft.public.dotnet.languages.csharp) - RE: XML as a WebService parameter
... \par From your description, you have an ASP.NET webservice which has a webmethod accepting a XML string parameter, and you'll get validation error when you call the webservice, correct? ... \par Generally, for XML webserivice, since its underlying message is encoded via SOAP XML, therefore, we should not directly pass parameter or return value of raw XML string content. ... \par Microsoft MSDN Online Support Lead ... (microsoft.public.dotnet.framework.webservices) - WriteXml, DateTime, and Timezone data
... I am then passing this string back to a PowerBuilder module that is taking this XML string and doing what it needs to do with it. ... the TimeZone portion? ... (microsoft.public.dotnet.xml) - Re: Inserting XML String to a Text datatyped column
... retrieves and sends it back or use the sp_OA stored procedures to drive it ... you will be able to store it as either a string or XML datatype ... Best regards ... > This returns an XML string, ... (microsoft.public.sqlserver.xml) |
|