parsing

Seeking (PHP) code to fetch e-mail, parse it and act upon it

Before I probably reinvent the wheel, can anyone tell me if there exists a FOSS code library to check email on a regular basis (or driven by a cron job), to parse the title and body and to perform certain functions (mainly sending other emails). I was thinking PHP as it is server side and good at string handling, but I would be happy en...

parse a xml in c++

Hello! i want to parse a xml like that. My output need to be a code in c or c++ who make the transformation of each letter in phoneme. I introduce a word at input and my generated code need tu pe transformed based on the rules from xml. Any sugestion for begening pls... <?xml version="1.0" encoding="UTF-8"?> <rules> <define_groups...

Jersey Problem with Parsing a JSONArray

Hi, I'm trying to implement a Resource with the jersey framework. But if I call my resource, I will get a parsing exception, that the parser can't parse JSONArray datatype. Here's my resource structure: @Path("/books") @Consumes("application/json") public class BookResource { @GET @Produces("application/json") public JSONArray getAll...

Parse incoming messages (which are in xml format) via bluetooth, read the value in the message and display a graphic

Hi, I am able to read incoming messages via bluetooth from my phone. I want to parse the incoming stream (new CAN message in xml format every 100 ms), read the value in the message and display a graphic on the main screen of phone. Need help in parsing this dynamic incoming stream. Programming in Java in Eclipse for Android. Thank yo...

In Perl, how can I parse a string that might contain many email addresses to get a list of addresses?

I want to split the a string if it contains ; or ,. For example: $str = "[email protected];[email protected],[email protected];[email protected];"; The expected result is: result[0]="[email protected]"; result[1]="[email protected]"; result[2]="[email protected]"; result[3]="[email protected]"; ...

PHP: RSS parsing

I want to parse a websites news section. It has a RSS subscribe button but the outlook looks odd and I'm not sure how to parse it. http://www.networkroi.co.uk/DesktopModules/ArticleManager/ArticleRss.aspx?id=324&amp;pid=0 It's not in XML which would have been a lot easier. Here is the news page with that link on it - http://www.netwo...

json parse response can have one or multiple objects

hi. i need to parse this response in android using the android json parser but the thing i cant find the answer to anywhere is: how do i parse the data if for example "itineraries" can contain one or sometimes more objects of the type itinerary? if it contains one than it is returned like this but if it contains more it is returned with...

How do I parse Visio drawings using .Net?

We already have several (100+ pages) of drawings in the same format that describe interconnecting systems. Instead of pounding keys for 3 months transferring these relationships to a spreadsheet, I would like to parse the Visio drawings directly. Is there a library dedicated to Visio that would accomplish this? Am I just missing somethi...

what is top down parsing ??

hello, i am an student need to implement an top down parser for my mini project i confident understand the concept and i read the Wikipedia article but still i have some doubts can any one explain about top down parsing and how to implement it with a small example... ...

Parse XML in C#

Hello I want to know how can I parse this simple XML file content in C#. I can have multiple "in" elements, and from those I want to use date, min, max and state child values. <out> <in> <id>16769</id> <date>29-10-2010</date> <now>12</now> <min>12</min> <max>23</max> <state>2</state> <description>enter text</description> </in> <in> <i...

recognize Ruby code in Treetop grammar

I'm trying to use Treetop to parse an ERB file. I need to be able to handle lines like the following: <% ruby_code_here %> <%= other_ruby_code %> Since Treetop is written in Ruby, and you write Treetop grammars in Ruby, is there already some existing way in Treetop to say "hey, look for Ruby code here, and give me its breakdown" with...

Problem parsing xml with jquery

I'm trying to parse xml from SharePoint service (lists) using jquery. I have XMLHttpRequest object xData which contains responseXML property, which is IXMLDOMDocument2. xData.responseText has following value: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http...

Java String Manipulating HTML Tags

I have a java string with some text and html: <title>test title</title> blabla bla more text What I am trying to achieve is two-fold: 1) Retrieve the content of <title></title> and save it in a separate string. 2) Remove that part of the original string: <title>test title</title> So the end result would be something like originalS...

[Python] Extracting data from a URL result with special formating

I have a URL: http://somewhere.com/relatedqueries?limit=2&amp;query=seedterm where modifying the inputs, limit and query, will generate wanted data. Limit is the max number of term possible and query is the seed term. The URL provides text result formated in this way: oo.visualization.Query.setResponse({version:'0.5',reqId:'0',status:'...

How do you find the "main" picture of a website, given the URL?

Let's say you're given http://nytimes.com How would you pull out the "main" image? The reason I'm asking is because Flipboard is able to grab the main image from a website, just using the URL. You could parse out all the image tags. But then what? ...

is setlocale thread-safe function?

hi, i need to change locale in the thread to parse double with strtod() correctly, i'm using setlocale() for this (C++). is it thread safe? UPD: another problem. when i invoke setlocale() in main function it doesn't effect in other routines deeper. why??? there are a lot of code, so it's problematic to write the chunk. ...

Parsec parse many question

Hi. I need to create a parser for a programming language. So far it is 95% done, I'd say, except for a tiny detail. The program written in this language has the following structure: outputs inputs expressions The requirement is that outputs cannot be mixed with inputs. For example: x := output of int; y := output of in; ..... z := i...

Parsing SQL CREATE TABLE statement using jQuery?

I am writing a web app which uses SQL as input. This SQL must always be a CREATE TABLE statement, and what my app needs to do is getting the following attributes from it: Field name Type Length (if available) Binary (if available) Allow NULL (if available) Auto increment (if available) Example SQL: CREATE TABLE customer (First_Name ...

Writing a parser with Wisent

Hi! I've described a grammar in a .wy file, but how can I build the parser? Also, sorry if this question is too simple, but I'm having a bad time figuring out how to use CEDET. Are there any docs besides the gentle intro and the info files? Thanks! ...

How to validate the connection string comming from a text file

there is a way by which we parse any time input given by user... here i am taking the input of a connection string from a text file i am supposed to assume that the user who keeps this string in the text file can be trusted. but what if he makes a typo a mistake unknowingly, that will cause the coming code to cause exception, i would...