parsing

Get google and yandex search results

Hi, I want to parse google and yandex search results for my little website analyzer utility. so i should send hundreds requests per minute. What is good practice for this issue? Is google search api a good way? ...

Help with Imgur API and VB.NET - Image POST.

Hi, I'm trying to send an image to Imgur's server. Everything went fine and I'm getting the URL of the image from the parser but when I'm trying to open it on the web browser, I'm not getting the image... only a "broken image" icon. I think it's a problem in the convertion to the byte array.... but I don't get it. please let me know/fi...

How to find multiple words on the same line in Notepad++

I have a 4MB log file from the Windows XP firewall which I'm trying to find lines that have both DROP and an IP and a port number. My regex-fu is weak and I'm assuming this is the reason I'm struggling. The words "DROP", "10.1.1.1" (for example) and "8801" need to be found on the same line and may be spread across the line and separated...

Plugins for firefox, which help to write HTML parsers

Hi, Anybody know plugins for firefox, which help to write HTML parsers? it will be nice if plugin allow to test XPath and regular expressions(highlight matched text, cut some parts etc). ...

Use of SAX parser in Android - OutOfMemory Issue

Hi everybody, I have been using a SAX parser for a while now to get data from various XML, but today i'm banging my head on a new problem with a hudge XML (compared to the previous ones . here around 12k lines) with a lot of repetitive items in it. Most of the time, the items are part of a block : <content> <item lbl="blabla"> ...

Looking for a C# code parser

I'm looking for a set of classes (preferably in the .net framework) that will parse C# code and return a list of functions with parameters, classes with their methods, properties etc. Ideally it would provide all that's needed to build my own intellisense. I have a feeling something like this should be in the .net framework, given all ...

What is the fastest method to parse XML?

What is the fastest method(fastest performing) to parse an xml that is in a string, in Java platform ? The file size can be around say 25kb. The constraint is that I am not presented with an xml file, rather I have to parse the xml string !! ...

Parsing tcl arrays in ruby with treetop

I have a bunch of data in (what i think is) a tcl array. Basically it's in the form of {a {b c} d {e f} g}. It's only nested one deep, but isn't always nested, that is to say, a may just be a or it may be {aa bb} or possibly {}, but never {aa {bb cc}}. I want to extract this array so I can use it in ruby. My first thought was, "No probl...

How do I parse this json with php and upload some elements to Amazon S3?

Hello All, I have to import from an api http://somegoodrecipe.com/recipes/?format=json. It has 5 components: recipe_id recipe_title recipe_thumbnail (image) recipe_swf_url (flash) recipe_description I can use this to print it out: $json = file_get_contents("http://somegoodrecipe.com/recipes/?format=json", true); $decode = json_dec...

Problem using NSXMLParser with NOAA data on iPhone

Can anyone help me see why NSXMLParser is not causing these methods parser:didStartElement:namespaceURI:qualifiedName:attributes: parser:didEndElement:namespaceURI:qualifiedName:attributes: to fire for the part of the following data: <?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schema...

Java Equivalent to .NET's DateTime.Parse?

I'm working on a java class that I will use with Pervasive Data Profiler that needs to check if a Date String will work with .NET's DateTime.Parse. Is there an equivalent class or 3rd party library that can give me this functionality that is very close to .NET's DateTime.Parse? I would need it to be able to handle a broad range of date...

BlackBerry/J2ME - SAX parse collection of objects with attributes

I have a problem with using the SAX parser to parse a XML file. It is a complex XML file, it is like the following. <Objects> <Object no="1"> <field name="PID">ilives:87877</field> <field name="dc.coverage">Charlottetown</field> <field name="fgs.ownerId">fedoraAdmin</field> </Obj...

Handling Special Characters in Json parser in Objective C

Can any one tell how we can handle html escape codes for special characters like & and ' while using Json Parser. I am using SBJson Parser. The web service content - term_data: { * title: "News &amp;amp; Politics" * tid: "49" } Here the actual content should be News and Politics for title. ...

can't read XML via PHP

I can't find the reason, only see the following error message. Input is not proper UTF-8, indicate encoding ! Bytes: 0x00 0x5D 0x5D 0x3E the followings are my php code $reader2 = new XMLReader(); $reader2->XML($xmlstring); $user_data=""; while ($reader2->read()) { if ($reader2->name == "user_id" && $reader2->nodeType == XMLReade...

How to parse a string (by a "new" markup) with R ?

Hi all, I want to use R to do string parsing that (I think) is like a simplistic HTML parsing. For example, let's say we have the following two variables: Seq <- "GCCTCGATAGCTCAGTTGGGAGAGCGTACGACTGAAGATCGTAAGGtCACCAGTTCGATCCTGGTTCGGGGCA" Str <- ">>>>>>>..>>>>........<<<<.>>>>>.......<<<<<.....>>>>>.......<<<<<<<<<<<<." Say that I wa...

Tricky file parsing. Inconsistent Delimeters

I need to parse a file with the following format. 0000000 ...ISBN.. ..Author.. ..Title.. ..Edit.. ..Year.. ..Pub.. ..Comments.. NrtlExt Nrtl Next Navg NQoH UrtlExt Urtl Uext Uavg UQoH ABS NEB MBS FOL ABE0001 0-679-73378-7 ABE WOMAN IN THE DUNES (INT'L ED) 1st 64 RANDOM 0.00 13.90 0.00 10.43 0 21.00 10.50 6.44 3.22 2 2.00 0.50 2.00 2.00...

How to parse the file name and rename in Matlab

I am reading a .xls file and then procesing it inside and rewriting it in the end of my program. I was wondering if someone can help me to parse the dates as my input file name is like file_1_2010_03_03.csv and i want my outputfile to be newfile_2010_03_03.xls is there a way to incorporate in matlab program so i do not have to m...

When is better to use a parser such as ANTLR vs. writing your own parsing code?

I need to parse a simple DSL which looks like this: funcA Type1 a (funcB Type1 b) ReturnType c As I have no experience with grammer parsing tools, I thought it would be quicker to write a basic parser myself (in Java). Would it be better, even for a simple DSL, for me to use something like ANTLR and construct a proper grammer definit...

How to parse simple statement into CodeDom object

I need to parse a simple statement (essentially a chain of function calls on some object) represented as a string variable into a CodeDom object (probably a subclass of CodeStatement). I would also like to provide some default imports of namespaces to be able to use less verbose statements. I have looked around SO and the Internet to fi...

Parsing RFC 2822 date in JAVA

I need to parse an RFC 2822 string representation of a date in Java. An example string is here: Sat, 13 Mar 2010 11:29:05 -0800 It looks pretty nasty so I wanted to make sure I was doing everything right and would run into weird problems later with the date being interpreted wrong either through AM-PM/Military time problems, UTC t...