parsing

Are you aware of any lexical analyzer or lexer in Qt?

Are you aware of any lexical analyzer or lexer in Qt? I need it for parsing text files. ...

libxml for python's utf encoding issue or mine?

hi all I'm trying to extract the "META" description from a webpage using libxml for python. When it encounters UTF chars it seems to choke and display garbage chars. However when getting the data via a regex I get the unicode chars just fine. Am I doing something wrong with libxml? thanks ''' test encoding issues with utf8 ''' from lx...

Good C library to parse apache log file

I would like to parse a lot of apache log files with a C library. Who knows a good C library which is optimized for good performance? Thank you for advice! ...

How does facebook know what image to use when you post a link?

Possible Duplicate: How does Facebook detect images when adding a link? hi all, curious how facebook is able to pull an accurate image when you post a link. I know they first look for a meta tag with the image the site owner wants them to use but if that doesn't exist what logic do you think they do to get what image should be...

How to seperate String into chars

public static string kw; public String parse(String keyword) { this.keyword = keyword; char[] letters = keyword.ToCharArray(); string g; long length = System.Convert.ToInt64(keyword.Length.ToString()); for (int i = 0; i <= length-1; i++) { kw = "/"+letters[i]; } return kw; } So if the keyword i...

How to Import data to SqLIte using Adobe Air

Hi, I am working on an Adobe Air project(using JavaScript and HTML). Users can install application and can enter customer details. The central server(PHP + MySQL) contains all the customer data and air applications sends customer data to that server and request for new data from the server. This process is working fine. But now I want o...

XML reading using jQuery is not working in ie6 and ie8

XML reading using jQuery is not working in ie6 and ie8. i've used the below code.. the alert is not coming in ie8, ie6, i've not tested with other internet explorer versions. $(document).ready(function() { $.ajax({ type: "GET", url: "xml/contextMenu.xml", dataType: "xml", success: function(xml) { ...

What lexer to build a lexer/parser in Scala

Hi there, I'm currently looking for a lexer/parser that generate Scala code from a BNF grammar (a ocamlyacc file with precedence and associativity) and I'm quite confused to find.. almost nothing: For parsing, I found scala-bison (that I have a lot of trouble to deal with). All the other tools are just Java parser imported into Scala (l...

How parse a string as linq exprssion ?

I've this linq to devforce expression : (from r in mgr.testTables select r).OrderBy(r => r.id); I want to specify sorting column name as a string, I need something like this : string orderBy = "r => r.id"; (from r in mgr.testTables select r).OrderBy( orderBy ); is there any way to parse a string as linq expression ? ...

Printf syntax parser for PHP/Codeigniter?

Using PHP and/or Codeigniter, I want to create some string templates to be store in a database so that later, they can be used to print out a customize statement. For example, I want to store this "hello %s! you are the %d visitor." in my database so that later I can plug in a name and number to print out this message "hello bob! you ar...

Method for guessing type of data represented currently represented as strings in python

I'm currently parsing CSV tables and need to discover the "data types" of the columns. I don't know the exact format of the values. Obviously, everything that the CSV parser outputs is a string. The data types I am currently interested in are: integer floating point date boolean string My current thoughts are to test a sample of ...

creating and adding a new child element to an xml document using the SAX interface of libxml2

Hello everyone. My problem is that I need to parse an HTML document chunk by chunk and add a comment in the head element of the document. I am using C and I found that libxml2 is the best library out there for this purpose. As I am receiving only chunks of data at a time I thought using a SAX parser would be a better option. Howeve...

Java SAX parser progress monitoring

I'm writing a SAX parser in Java to parse a 2.5GB XML file of wikipedia articles. Is there a way to monitor the progress of the parsing in Java? ...

using link grammar parser

Hey guys, Is it adequate to use the link grammar parser to do POS tagging? How is the performance when it comes to informal english with a little of my country's lingo? Does the link grammar parser also performs a subject-object relationship identification? Doing POS tagging is the first step towards NER right? ...

iPhone: repeating Elements in XML

Hi, I am new to XML parsing. I am parsing the following XML. There are tutorials for if XML has unique attributes but this XML has repeating attributes. <?xml version="1.0" encoding="utf-8"?> <start> <Period periodType="A" fYear="2005" endCalYear="2005" endMonth="3"> <ConsEstimate type="High"> <ConsValue dateTy...

Reading and parsing Excel files in C#

What is the best way/library to read Excel 2003 and 2007 files using C#? I need to do some heavy parsing. ...

Counting distinct items and parsing comma-delimited values using XSLT

Suppose I have XML like this: <child_metadata> <metadata> <attributes> <metadata_valuelist value="[SampleItem3]"/> </attributes> </metadata> <metadata> <attributes> <metadata_valuelist value="[SampleItem1]"/> </attributes> </metadata> <metadata> <attribu...

To use goto or not ?

Hello everyone. This question may sound cliched but I am in a situation here. I am trying to implement a finite state automaton to parse a certain string in C. As I started writing the code, I realised the code may be more readable if I used labels to mark the different states and use goto to jump from one state to another as the cas...

Creating object based on string parsed in

Suppose I have a class Image. At some point in parsing, "Image" is read in at the appropriate time, meaning I want to create an object of class Image. What I'm considering is mapping these strings to a constructor call to the appropriate class, but I'm not sure how to accomplish this. I.e. container.push_back( some_map[stringParsedI...

How to do peek() in Jackson json library?

I'm using the Streaming API JsonParser of the Jackson library to do some custom json parsing in java. Is there a way of achieving functionality similar to a peek() method, where the next token is returned but the cursor position is not moved forward? The use case for this is similar to the following: JsonParser parser = new JsonFactor...