Home Posts Topics Members FAQ
Greg
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
Subscribe Reply
3 2465
Kevin Spencer
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.goo glegroups.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
Greg
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.
"sidjsidjsidjis djsiasdjakjaksj ?key1=value1&ke y2=value2&key3= value3"
Dec 1 '05 #3
Kevin Spencer
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.goo glegroups.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."sidjsidjsidjis djsiasdjakjaksj ?key1=value1&ke y2=value2&key3= value3"
Dec 1 '05 #4
This thread has been closed and replies have been disabled. Please start a new discussion.
Similar topics
7 2595 Help with a regular expression 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 field beside name. I want to get the following but not sure how to modify the code below. 1. Field Name (to appear beside NAME:) 2. Field Type (to appear beside TYPE:) PHP |
11 3902 Regular expressions: parsing an "OLEDB like" connection string ... 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 parsed can completely wreck it. The string I am trying to parse is as follows: commandText=insert into (Text) values (@message + N': ' + @category);commandType=StoredProcedure; message=@message; category=@category I am looking to retrive name value... .NET Framework |
3 2612 Design opinions/urls/snippets requested; parsing simplistic config files 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 as "gotchas") for doing this. I'm implementing a program that needs to read a standard configuration file, in key=value pairs for starters (though I'm open to other ideas). Basically it would be no more than about 20 lines total, one key per... C / C++ |
2 2188 Help w/ regex for parsing parameters 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 /fn=Defense/receptor member /process=Signal transduction /len=98 Here is the regex: C# / C Sharp |
9 1470 Parsing using RE? 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 <Delim2> Key <Delim1> Value <Delim3> C# / C Sharp |
1 1833 parsing the output using string.split and current locale.. 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 long as the default locale is en-US. However, the moment, I change it to say Greek/Portuguese, the parsing logic goofs up. I don't have access to the source code of legacy application to make changes. C# / C Sharp |
4 3173 C SHARP - Parsing URL for Variable 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 "s": So when you look at this url: "http://www.goldenretrieverforum.com/search.php?s=5817617a59fb630a7f40846e4a29efc1&do=getdaily" C# / C Sharp |
17 2783 parsing VB code with a regex 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 might be a neat way to solve this, but I am new to them. Can anyone give me a hint here? The catch is, it must only find tokens that are not quoted and not commented; examples follow .NET Framework |
3 2507 Parsing String, Dictionary Lookups, Writing to Database Table 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 sqlite3 database table. Here's the context: The OMR card reader sends a stream of 69 bytes over the serial line; the last byte is a carriage return ('\r') indicating the end of record. Three pairs (in specific positions at the beginning of the... Python |
7 1968 Ideas for parsing this text? by: Eric Wertman |last post by: I have a set of files with this kind of content (it's dumped from WebSphere): ] Python |
8649
What is ONU? by: marktang |last post by: ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of... General |
8586 Changing the language in Windows 10 by: Hystou |last post by: Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,... Windows Server |
9137
Problem With Comparison Operator <=> in G++ 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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in... C / C++ |
1 8864 The easy way to turn off automatic updates for Windows 10/11 by: Hystou |last post by: Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,... Windows Server |
8838
Discussion: How does Zigbee compare with other wireless protocols in smart home applications? by: tracyyun |last post by: Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some... General |
5842 Couldnt get equations in html when convert word .docx file to html file in C#. by: conductexam |last post by: I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();... C# / C Sharp |
4351 Trying to create a lan-to-lan vpn between two differents networks by: TSSRALBI |last post by: Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls... Networking - Hardware / Configuration |
4592 Windows Forms - .Net 8.0 by: adsilva |last post by: A Windows Forms form does not have the event Unload, like VB6. What one acts like? Visual Basic .NET |
1 3025 transfer the data from one system to another through ip address by: 6302768590 |last post by: Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system C# / C Sharp |
By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.
To disable or enable advertisem*nts and analytics tracking please visit the page.