473,323 Members | 1,589 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,323 software developers and data experts.

Parsing Key Value Pairs

What is the best way to parse keys and their values from a http
repsonse (byte array?) I'd like to keep it as generic as possible as I
have many repsonses to parse.

Any thoughts would be appreciated.

Greg.

Dec 1 '05 #1
3 2452
Need more background information about your app.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition

"Greg" <gr*************@yahoo.co.uk> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
What is the best way to parse keys and their values from a http
repsonse (byte array?) I'd like to keep it as generic as possible as I
have many repsonses to parse.

Any thoughts would be appreciated.

Greg.

Dec 1 '05 #2
Thanks Kevin,

dont worry, I've just written a class to do it. I had to do a very
through job, since it is going to be used in several apps. The reason
why I asked was I was wondering if Microsoft had supplied a class that
did it for us.

What I wanted was to be able to separate values for their corresponding
key from a string e.g.

"sidjsidjsidjisdjsiasdjakjaksj?key1=value1&key2=va lue2&key3=value3"

Dec 1 '05 #3
Ah. About the only way I know to do this is with the good ol' fashioned
String.Split.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition

"Greg" <gr*************@yahoo.co.uk> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Thanks Kevin,

dont worry, I've just written a class to do it. I had to do a very
through job, since it is going to be used in several apps. The reason
why I asked was I was wondering if Microsoft had supplied a class that
did it for us.

What I wanted was to be able to separate values for their corresponding
key from a string e.g.

"sidjsidjsidjisdjsiasdjakjaksj?key1=value1&key2=va lue2&key3=value3"

Dec 1 '05 #4

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

Similar topics

7
by: YoBro | last post by:
Hi I have used some of this code from the PHP manual, but I am bloody hopeless with regular expressions. Was hoping somebody could offer a hand. The output of this will put the name of a form...
11
by: Martin Robins | last post by:
I am trying to parse a string that is similar in form to an OLEDB connection string using regular expressions; in principle it is working, but certain character combinations in the string being...
3
by: John Doe | last post by:
I've been doing some reading/research on parsing simple configuration files through C, and have heard various opinions on the matter. I'd like to solicit some opinions and design criteria (as well...
2
by: Julie | last post by:
I have to process parameter input strings of key/value pairs /key=value where value _may_ contain a slash /. Here is a sample input string: /def=gamma chain (FT2) /name=NULL /p_id=CF11423:SF7...
9
by: Ravi Singh (UCSD) | last post by:
Hello all I have a huge string that I need to parse Key <Delim1> Value <Delim2> Key <Delim1> Value <Delim2> Key <Delim1> Value <Delim3> Key <Delim1> Value <Delim2> Key <Delim1> Value...
1
by: Prasad Dabak | last post by:
Hello, I have a legacy unmanaged application that returns property=value pairs separated by chr(252)and I am trying to parse this output from C# using string.split method. This works fine as...
4
by: Jozef Jarosciak | last post by:
Hi everyone, I am building a web crawler and one of the features which I need to include is exclusion of specified 'variable + value' from the url. Example, user wanted to extract variable...
17
by: Mark | last post by:
I must create a routine that finds tokens in small, arbitrary VB code snippets. For example, it might have to find all occurrences of {Formula} I was thinking that using regular expressions...
3
by: Rich Shepard | last post by:
I need to learn how to process a byte stream from a form reader where each pair of bytes has meaning according to lookup dictionaries, then use the values to build an array of rows inserted into a...
7
by: Eric Wertman | last post by:
I have a set of files with this kind of content (it's dumped from WebSphere): ]
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.