473,396 Members | 1,895 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to parse XML-string ?


Could someboby help me please with this simple problem ?

I've got a resultvalue as string in XML-format:
string result = <?xml version="1.0" encoding="ISO-8859-1"
?><HITLIST><KEYSIZE>7</KEYSIZE><NKEYS>0000000007</NKEYS><KEYSET>001102800117820018532002759200276280 0278510033581</KEYSET><STATUS>READY</STATUS></HITLIST>

and I would like to extract these values:
KEYSIZE - that number 7
NKEYS - that number 7
and KEYSET - whole string with ID's

is there a better way than do this with string operations like substring ?
Jul 20 '07 #1
0 1208

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Francesco Moi | last post by:
Hi. I'm trying to parse a HTTP file http://www.foo.com/foo.xml by using Xerces-Perl: ------------------------------------------ use XML::Xerces; my $file =...
8
by: Spartanicus | last post by:
The document at http://homepage.ntlworld.com/spartanicus/custom_dtd.htm uses a custom DTD, the w3c validator validates it but with this warning: "Unknown Parse Mode! The MIME Media Type...
2
by: Samuel | last post by:
Hello, I am trying to convert a local time into UTC ISO8601, then parse it back into local time. I tried the following: ---------------------- #!/usr/bin/python import time import datetime...
22
by: Illya Havsiyevych | last post by:
Hello How easily parse VB/VBA code by VB/VBA code ? Is any ready solutions ? Thank's, illya
2
by: Robert Fischbacher | last post by:
Hello, does anybody know if there is a existing tool that can convert valid C# Code to a XML structure? I tried to parse a C# program to analyze the structure of the existing program code, but...
3
by: Sam | last post by:
Hi Everybody, I'm using C# and System.XML and can parse XML files like this: <LogIn>Yes</LogIn> <Name>DB_MAGUser</Name> but I've been asked to parse and work with a XML file that looks...
7
by: akira | last post by:
Hello, I need to parse this XML file or XML stream . Is it possible to parse it with DOM reading each DataContainer one by one. <DataContainer> <name> </name> <birthDate> </birthDate>...
3
by: Nobody | last post by:
I'm trying to put together code to deal with a SOAP with attachements response, and I'd like to process the response in a single pass. The SOAP with attachments specification returns XML in a MIME...
3
by: askalottaqs | last post by:
i have an xml document that i need to parse in the most efficient way, the syntax of the document is like this <?xml version="1.0" ?> - <frameNumber4> - <v0> <X>0.148778095841</X> ...
6
by: =?Utf-8?B?RGF2aWRN?= | last post by:
Hello, I have an XML file generated from a third party application that I would like to parse. Ideally, I plan on having a windows service setup to scan various folders for XML files and parse the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.