parsing

RSS lib for java

Advise any rss parser for java,which support much formats. I am using informa,but informa very slow for GAE ...

parse search string

I have search strings, similar to the one bellow: energy food "olympics 2010" Terrorism OR "government" OR cups NOT transport and I need to parse it with PHP5 to detect if the content belongs to any of the following clusters: AllWords array AnyWords array NotWords array These are the rules i have set: If it has OR before or afte...

Get document DOCTYPE with BeautifulSoup

I've just started tinkering with scrapy in conjunction with BeautifulSoup and I'm wondering if I'm missing something very obvious but I can't seem to figure out how to get the doctype of a returned html document from the resulting soup object. Given the fllowing html: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org...

Data logged to a file; how do I rotate logs and how do I parse the data to not have 'gaps' in the data?

I've got a web application that, for performance reasons, throws any data sent into a logfile. I've got two concerns with this approach: How do I best rotate logs, in order to not lose data? For each user session multiple requests are logged. Each request has a unique id so there is an easy way for me to tie the requests to the sessio...

Making apache 2.2.11 parse .wml files as PHP?

I've tried a variety of combinations, the following being my last attempt: Addtype text/vnd.wap.wml wml Addtype image/vnd.wap.wbmp wbmp AddType text/vnd.wap.wmlscript wmls AddType application/vnd.wap.wmlc wmlc AddType application/vnd.wap.wmlscriptc wmlsc AddType application/x-httpd-php .wml How can I get stupid Apache 2.2.11 to parse...

Replace in place, parsing & string manipulation.

I'm trying to replace a set of characters within a string. The string may or may not have any data to change. The string is marked up in a way that allows for it to change it's color from a set of characters. The string can reset it's formatting to default by using a defined set of characters. This setup is very much like the ECMA-48 st...

PHP OPML Parser

Kindly tell me how to make an opml parser.I have the code but it is not working for all generic opml files if (file_exists('test.opml')) { $xml =simplexml_load_file('test.opml'); } for($i=0;$i<=count($xml);$i++) { $array=array($xml->body->outline->outline[$i]); $key=(array_keys($array)); foreach ($array as $key) { echo "<...

Replace standard Android JSON parser for better performance?

I know that Android has a JSON parser baked in but I was wondering if it was worth using something that offered better performance (like Jackson - see http://jackson.codehaus.org/) ? Anybody tried that ? ...

Is there a better way to deal with reserved characters when parsing XML/JSON data on the iPhone?

The following code works, but it's ugly and creates a bunch of autoreleased objects. I'm using similar code for parsing reserved HTML characters as well (for quotes, & symbols, etc). I'm just wondering... Is there a cleaner way? NSString *result = [[NSString alloc] initWithString:userInput]; NSString *result2 = [result stringBy...

"The left hand side of an assignment must be a variable" due to extra parentheses

I know why the following code doesn't compile: public class Main { public static void main(String args[]) { main((null)); // this is fine! (main(null)); // this is NOT! } } What I'm wondering is why my compiler (javac 1.6.0_17, Windows version) is complaining "The left hand side of an assignment must be a variable". ...

how jquery parse xml from another xml??

hi,,, please help me to parse xml from another xml... i have this xml named browser.xml <tree> <root name="SA" hidden="yes"> <folder name="Diagram"> <folder name="Activity" refreshURL="diagram_activity.xml"></folder> <folder name="Business Process" refreshURL="diagram_business_process.xml"></folder> </folder> <folder name="Other"> <fo...

Automated download of website content using ASP.net

Using ASP.net, what methods can I use to do the following: Open up a connection to a given URL to read HTML content Parse the given URL for hyperlinks, and place them in an array Loop through each hyperlink (only 1 level down), opening each one, saving the HTML contents in a table, and move to the next hyperlink until done. If ASP.ne...

how to strip namespaces with e4x?

I have an arbitrary XML document provided by a URL. I also have an xpath-like expressions. var xml = <doc><node1><node2><node3>some value</node3></node2></node1></doc>; var path = "node1.node2.node3"; I need to verify if the above path into the XML is valid. I tried to do this using eval and E4X. var value = eval("xml."+path); Ho...

Regarding parser DOM and REGEX

Hi I am writing an application in java I need to fetch specific data from website.I do not know which one to use whether REGEX or Parser.Can anybody please advise me how to get this done? and which one is prefered. Thanks ...

jQuery $.getJSON - How do I parse a flickr.photos.search REST API call?

Trying to adapt the $.getJSON Flickr example: $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&amp;tagmode=any&amp;format=json&amp;jsoncallback=?", function(data){ $.each(data.items, function(i,item){ $("<img/>").attr("src", item.media.m).appendTo("#images"); if ( i == 3 ) return false; ...

getElementsByClassName not working on parsed html data in greasemonkey

Hi my code is as such var xhReq = new XMLHttpRequest(); xhReq.open("GET", linksRaw, false); xhReq.send(null); var serverResponse = xhReq.responseText; var tempDiv = document.createElement('div'); tempDiv.innerHTML = serverResponse.replace(/<script(.|\s)*?\/script>/g, ''); var plzWork = tempDiv.getElementsByClassName('organizationID').in...

Elegant way of parsing Data files for Simulation

I am working on this project where I need to read in a lot of data from .dat files and use the data to perform simulations. The data in my .dat file looks as follows: DeviceID InteractingDeviceID InteractionStartTime InteractionEndTime 1 2 1101 1105 1,2 1101 and 1105 are tab delimited and ...

Is there a Groovy XML parser that doesn't ignore the comment node?

I'm using the XmlParser to insert nodes into an existing XML. Unfortunately this parser ignores the comment nodes which I would like to keep in place. Is there another parser I can use? Thanks. ...

What language should I use to write a text parser and display the results in a user friendly manner?

My company's proprietary software generates a log file that is much easier to use if it is parsed. The log parser we all use was written by another employee as a side project, and it has horrible performance. These log files can grow to 10s of megabytes very quickly, and the parser we currently use has issues if a log file is bigger th...

What is the most efficient way to parse json in jquery?

I am using json data and iterating it through jquery and displaying my results... Using var jsonObj = JSON.parse(HfJsonValue); works in firefox but not in IE6.... HfjsonValue is a json string which is returned from my aspx code behind page... SO i dont use ajax... Any suggestion to get my json parsed better and cross browser one... ...