parsing

Is there a way to read a browser's history, using Adobe AIR or any other tool?

Hi, First of all, I'm not a hacker :) We're doing a project where we'll award points to users for visiting certain groups of sites. Obviously there are major privacy concerns, but we have no interest in actually knowing where they've been, just as long as the program we create can check the history and through an algorithm, rank the si...

Regex matching items following a header in HTML

What should be a fairly simple regex extraction is confounding me. Couldn't find a similar question on SO, so happy to be pointed to one if it exists. Given the following HTML: <h1 class="title">Title One</h1><p><a href="#">40.5</a><a href="#">31.3</a></p> <h1 class="title alternate">Title Two</h1><p><a href="#">12.1</a><a href="#">8...

XML Parsing error

Hi, I am returning a DataTable from a WebService which contains 10-100 rows depending on the query. Sometimes in this DataTable, i have some special characters coming in, like "$", which causes the problem and i get XML Parsing Error. One way i found was to Encode the string but I don't want to loop through each rows and column and en...

read pdf files using java

Hello, I want to parse pdf websites. Can anyone say how to extract all the words (word by word) from a pdf file using java. The code below extract content from a pdf file and write it in another pdf file. I want that the program write it in a text file. import java.io.FileOutputStream; import java.io.IOException; import com.itextpd...

Possible to parse this html with xpath?

Hello, I am working on gather sports statistics for a personal hobby project. I found this site with all the info I need:file:///Users/JohnJNichols4/Desktop/view-source%20cluster.leaguestat.com%20download.php%20client_code=ahl&file_path=daily-report%20daily-report.html Am I able to parse this site with xpath? I only have experience (...

Do optional closing HTML tags (e.g. </TR>) present extra cost to browser's HTML parser?

As per this recent question, HTML 4 standard indicates that closing </TD>/</TR> tags are optional. The question is, if you write your HTML omitting those closing tags, would that affect the amount of work that the browser's HTML parser must do one way or the other? I realize that the difference - even if there's any effect - would prob...

Ruby/Rails: Determine variables from plain text to update via form

I'm creating an app where users can edit their own CSS (in SCSS syntax). That works fine, however, I eventually want these CSS files to be "programmable" so that users that don't know CSS can still edit them in a basic manner. How? If I can mark certain things as editable, I don't have to make an impossible database schema. For example ...

Any tool for easily parse a config file on Linux ?

Hi, I need a tool that allows me to parse a config file and request some data from it. The format of the config file is free (it can be INI, XML, and so on) but the more human-friendly, the better. Here is a sample config file (using XML, but it could be anything: i don't mind the format): <?xml version="1.0" encoding="UTF-8" ?> <con...

Parsing a string to "year-month-day" format in C#

Hi Im using a webservice that needs a datetime in the following format "2010-12-24" I have the string to parse in the same "way" but as said, its a String. string myDate = "2010-12-24"; How can i parse it so that it gets the same format? Have tried using : DateTime.Parse(mystring); but this gives me a colon separated format. ...

Runtime parsing in Android

I am writing a small game for the android platform (HTC Desire) and i am trying to implement a simple scripting language, mostly to set variables and check if conditions are met. So I thought maybe there was a runtime parser in the android library, that way I can put some of the logic in scripts, instead of in the engine. It's quite ba...

Parsing a string to determine it's a website URL? (asp.net)

In ASP.net what's the best way I can parse a string to determine if it's a valid URL? ...

How to parse dates in multiple formats using SimpleDateFormat

I am trying to parse some dates that are coming out of a document. It would appear users have entered these dates in a similar but not exact format. here are the formats: 9/09 9/2009 09/2009 9/1/2009 9-1-2009 What is the best way to go about trying to parse all of these? These seem to be the most common, but I guess what is hanging m...

extract text from pdf files

I need to extract text (word by word) from a pdf file. import java.io.*; import com.itextpdf.text.*; import com.itextpdf.text.pdf.*; import com.itextpdf.text.pdf.parser.*; public class pdf { private static String INPUTFILE = "http://ontology.buffalo.edu/ontology%28PIC%29.pdf" ; private static String OUTPUTFILE = "c:/new3.p...

Extract each column of a pdf file

Hello, I need to extract text from pdf files using itext. The problem is that some pdf files contain 2 columns, when I extract text, I obtain as result a text file where columns are merged (in the same line, we found 2 columns) this is the code: public class pdf { private static String INPUTFILE = "http://www.revuemedecinetropicale.c...

Extract columns of a pdf file

Possible Duplicate: Extract each column of a pdf file I need to extract text from pdf files using itext. The problem is that some pdf files contain 2 columns, when I extract text, I obtain as result a text file where columns are merged (in the same line, we found 2 columns) this is the code: public class pdf { private stati...

need a Saple JSON parser in objective c

I want to know to parse a json object in objective c... i get the json object by loading a url.... can u please tell me how to do it or any samples or any reference.... the following is the sample json... {"name":"WFNX","now": {"id":"17749528","song":"Back Down South","artist":"Kings Of Leon"}, "desc":"101.7 - True Alternative",...

&lt; and &gt; are stripped out of the parse result when using PHP/libxml

Hello, (I'm using PHP 5.2.6 and phpinfo says it has libxml 2.6.32 loaded) I'm also using wordpress and whenever xml_parse() function is called I get &lt; and &gt; stripped out from the result, instead of being converted to "<" and ">". I found people talking this is a bug which hits newer versions of libxml but I have the old one and...

Java 1.5: mathematical formula parser

Hello i often develop JTableModels in which some cells must contain the result of apliying a certain simple mathematical formula. This formulas can have: Operators (+,-,*,/) Number constants Other cell references (which contains numbers) Parameters (numbers with a reference name like "INTEREST_RATE") I often resolve it making a littl...

Java method invocation parser?

Hi, I need to parse certain method invocation calls including the whole signature out of some Java classes, e.g. public class MyClass { public void myMthod() { // ... some code here result = someInstance.someOtherMethod(param1, param2); // ... some other code here } } As a result I would like to get som...

How can we spot an XElement value that's CData?

I have some xml in which a specific element, let's call it dave might either be: <dave>A Normal Value</dave> or <dave><![CDATA[A CData Value!]]></dave> When I'm parsing it I would like to be able to test whether the retrieved value is CDATA or not. How would I do this? ...