parsing

[jQuery] Parsing xml

Hi, I have this xml file: Response: <ns3:ExecuteResponse xmlns:ns3="http://www.opengis.net/wps/1.0.0" xmlns:ns1="net/ows/1.1" xmlns:ns2="http://www.w3.org/1999/xlink" statusLocation="xxxxf62" serviceInstance="http:/http-post" version="1.0.0" service="xxx"> <ns3:Process ns3:processVersion="0.2"> <ns1:Identifier>OM_B</ns1:Identifier> ...

Is there a fast XML parser in Python that allows me to get start of tag as byte offset in stream?

I am working with potentially huge XML files containing complex trace information from on of my projects. I would like to build indexes for those XML files so that one can quickly find sub sections of the XML document without having to load it all into memory. If I have created a "shelve" index that could contains information like "boo...

extracting text from HTML (Perl)

I'm doing a script that enters a page and extract and extract information from it. The script I'm doing it in Perl. Problem: Not how to start running the script because when I start it picks up the url like this and this is not what I want <a href="http://valeptr.com/scripts/runner.php?BA=6672&amp;amp;hash=08c5c66839a468a11b7574e6ce02e...

How to retrieve a specific element with from xml with python

I'm trying to read through an xml feed I'm getting, but I can't access the specific elements. I'm using python, and the python documentation is really unclear about what I should use. Here is the feed: <title>More eagle</title> <summary>http://www.181.fm/winamp.plsstation=181eagle&amp;amp;style=&amp;amp;description=The%20Eagle%20(Class...

"Deparsing" a list using pyparsing

Is it possible to give pyparsing a parsed list and have it return the original string? ...

parse xml file and create a list of files

there is an info.xml file under every /var/packs/{many folders}/info.xml where are different directories but with the dirs's info in info.xml I need to parse through every {many folders} and create a list of the filepath which is inside the Path tags if the file type is "config" which can be found by checking if "config" is the type in...

Read complex types from wsdl in java

Hi, I'm havving a bit of a trouble finding some way to read the complex types from a wsdl in my Java app. I'm using WSDL4J but it doesn't seem to help me get the complex types. Is there a better lib for this? Thank you in advance ...

Parsing an XML file without root in Java

I have this XML file which doesn't have a root node. Other than manually adding a "fake" root element, is there any way I would be able to parse an XML file in Java? Thanks. ...

Design guidelines for parser and lexer?

I'm writing a lexer (with re2c) and a parser (with Lemon) for a slightly convoluted data format: CSV-like, but with specific string types at specific places (alphanumeric chars only, alphanumeric chars and minus signs, any char except quotes and comma but with balanced braces, etc.), strings inside braces and strings that look like funct...

HTML5-Compatible User-Agent Strings?

I'm interested in writing a log file analyzer that can determine the percentage of users who have HTML5-Canvas support based on the user agent strings in the logs. However, having scoured some of the literature out there on the subject, it's not obvious to me what I should be looking for in the user-agent string. One simple option would...

Jquery parsing xml from request

Hi, I am using Jquery. I have an xml returned from a webservice. So I want to extract some value from it. This is an xml example returned from webservice: <ns3:ExecuteResponse xmlns:ns3="http://www.opengis.net/wps/1.0.0" xmlns:ns1="http://www.opengis.net/ows/1.1" xmlns:ns2="http://www.w3.org/1999/xlink" statusLocation="http://webse...

Parsing Java String with SGML.

I have a Java String with SGML, something like this... <misspell></misspell><plain>I</plain> <plain>know</plain> <plain>you</plain> <suggestion>ducky</suggestion> <plain>suck</plain> <plain>and</plain> <plain>I</plain> <plain>rocky</plain> <plain>rock</plain> How do I parse it to get for instance say the text inside <suggestion> </sug...

How can I populate UITableView with XML?

I have a tab bar application. In one of my tabs, there is a search bar and a table view below that. When you enter something into the search bar, it returns parsed xml. I need to put this parsed information into the tableview below. The class inherits from UIViewController. I declared a UITableView object in the header file and linked it...

Leading zero when subtracting one time from another javascript

function setValue() { var startTime = document.getElementById('ToilA'); var endTime = document.getElementById('EndHours'); startTime = startTime.value.split(":"); var startHour = parseInt(startTime[0], 10); var startMinutes = parseInt(startTime[1], 10); endTime = endTime.value.split(":"); var endHour = parseInt(endTime[0], 10); va...

read parsed response from XML-RPC cocoa framwork

Hello, I try to use this library http://github.com/eczarny/xmlrpc to retrieve information from an xml-rpc server. The connection is ok and I can see the parsed object display in the console but I don't know how to read the response object even if I tried a lot. Here is the console result of NSLog(@"%@", [response object]); (response i...

parse Google Image search results without Google AJAX API

Hi, How to get Google Image results URL on Ruby without using Google AJAX API. I tried to get all node with tag and id beginning with ipf* but I got only 11/21 images URL... with these APIs :'open-uri' and 'rubyful_soup' It seems Google has merged HTML (for the 11 first results) and dynamic HTML generated by javascript (for the 10 ot...

Trying to parse an XML File in Java and store variables in an ArrayList.

I am trying to parse the following XML file in Java and to store the XTimeStamp variable in an ArrayList and YVoltage in another ArrayList: <?xml version = "1.0"?> <Data> <reading> <XTimeStamp> 12:00:00:01</XTimeStamp> <YVoltage> 0.6</YVoltage> </reading> <reading> <XTimeStamp> 12:00:00:02</XTimeStamp> <YVoltage> 0....

iPhone Parsing JSON : delegate methods

Hi everyone. I'm using this JSON framework. It's working well but I would like to put a loading view on my main screen to show that the iphone is downloading datas. I have searched for some delegate methode like - jsonBeginParse and - jsonEndParse but unsuccessfully. Have got an idea ? Thanks a lot ! ...

Parsing PDF files (especially with tables) with PDFBox

Hi! I need to parse a PDF file which contais tabular data. I'm using PDFBox to extract the file text to parse the result (String) later. The problem is that the text extraction doesn't work as I expected for tabular data. For example, I have a file which contais a table like this (7 colums: the first two always have data, only one Comple...

universal parsing of strings into float

In the environment that my program is going to run, people use ',' and '.' as decimal separators randomly on PCs with ',' and '.' separators. How would you implements such a floatparse(string) function? I tried this one: try { d = float.Parse(s); } catch { try { d = float.Parse(s...