I have to write an XPath expression to get the href attribute of the anchor tag in the html bellow that comes right after the one that is marked as "current-page" (in the example #notimportant/2).
<dd>
<a href="#notimportant/1" class="current-page">1</a>
<a href="#notimportant/2">2</a>
<a href="#notimportant/3">3</a>
<a ...
Like the title says, I would like to enable/disable certain grammar rules in a yacc or bison grammar file.
Is there a way to do so?
...
Has anyone provided intellisense to the QWhale Editor with an XSD file for an XML document?
The question could be generalized to what are the techniques for parsing an XSD schema to provide intellisense for an XML document.
...
I need to parse following String into a DateTime Object:
30/Nov/2009:16:29:30 +0100
Is there an easy way to do this?
...
In SQL Server it is easy to parse a vachar variable that contains a simple XML snippet constructed with attributes and load it into a temp table - see example below:
declare @UpdateXML VARCHAR(8000)
set @UpdateXML='<ArrayOfRecords>
<Record Field01="130" Field02="1700" Field03="C" />
<Record Field01="131" Field02="1701" Field03="C" ...
Hi,
I want my rails app to accept dates for a date field in the format dd/mm/yyyy.
In my model I have tried to convert the date to the American standard which I think the Date.parse method that Rails will call on it is expecting:
before_validation :check_due_at_format
def check_due_at_format
self.due_at = Date.strptime(self....
I wish to parse java source code files, and extract the methods source code.
I would need a method like this :
/** Returns a map with key = method name ; value = method source code */
Map<String,String> getMethods(File javaFile);
Is there a simple way to achieve this, a library to help me build my method, etc. ?
...
Hello I would like to know how to implement the solution to such a task:
There's a 500Mb file of plain English texts.
I'd like to collect the statistics about the frequency of words,
but additionally to be sure that each word is recognized correctly (or the majority of words).
In terms that 'cry' in the sentence "she gave a loud CRY" ...
Greetings everyone
Using the request object, I can't get a sole value as in this URI:
http://mydomain.com/controller/action/value1
Using $request->getParams() is not returning the value1.
Output:
array([controller] => 'controller', [action] => 'action')
The key is missing.
The issue itself is quite simple and I could parse the U...
I am looking for a regex (or other method) that can check and parse app store links. I have an app that can take record these links but I want to check that the format is correct before I accept it.
e.g.
http://itunes.apple.com/gb/app/instapaper/id288545208?mt=8
http://itunes.apple.com/us/app/iq-test-sale/id297141027?mt=8&uo=6
h...
I am seeking direction and attempting to label this problem:
I am attempting to build a simple inference engine (is there a better name?) in Python which will take a string and -
1 - create a list of tokens by simply creating a list of white space separated values
2 - categorise these tokens, using regular expressions
3 - Use a highe...
This code works:
from pyparsing import *
zipRE = "\d{5}(?:[-\s]\d{4})?"
fooRE = "^\!\s+.*"
zipcode = Regex( zipRE )
foo = Regex( fooRE )
query = ( zipcode | foo )
tests = [ "80517", "C6H5OH", "90001-3234", "! sfs" ]
for t in tests:
try:
results = query.parseString( t )
print t,"->", results
except ParseEx...
So, I'm getting this data. From the network socket, or out of a file. I'm cobbling together code that will interpret the data. Read some bytes, check some flags, and some bytes indicate how much data follows. Read in that much data, rinse, repeat.
This task reminds me much to parsing source code. I'm comfy with lex/yacc and antlr, bu...
Anyone have idea of parsing the ical calendar file with ical4j API for android app using eclipse as development environment.
I have added ical4j API, to my project, but getting some errors related to API.
...
Hi
I am currently tryibng to convert a given time(Entered via a text box) , The time entered would look a little like 01 52 22 mins secs mili secs.
however Timespan.parse(tbName.text) gives me an incorrect format error.
I have got it to work if i input something like 46 in to the textbox but then it sets the days to 46 not the second...
I have a dictionary in .txt format, which looks like this:
term 1
definition 1
definition 2
term 2
definition 1
definition 2
definition 3
etc.
There is a tab always before a definition, basically it's like this:
term 1
[tab]definition 1
[tab]definition 2
etc.
Now I need to wrap every term and it's definitions w...
Question: Is this an appropriate way to parse HTML into a plist?
I need to pull information from the following html. The HTML is in this style consistently. The first block of HTML is a section header and the second part is the sections content. The sections can have any number of contents.
This is the HTML.
<td class="boxcontainer">
...
I'm trying to parse an argument value in C and convert the number to a double value. I have:
char *stringEnd;
double num = strtod("123.0", &stringEnd);
I used 123.0 just to test the function, but it always returns a value of 0.0. Does anybody know what I'm doing wrong?
...
I am looking at being able to extract all plain text and analyse/amend from HTML/XHTML document and then replace if needed. Can I do this using HTML::Parser or should it be XML::Parser?
Are there any good demonstrations that anyone knows of?
...
Hi, I am currently doing an A level computing project, in which I need to parse XML and put the elements into an array. I am using JavaScript in Dreamweaver and the final application will be run in AIR. I am having a hard time understanding the code in this answer to another question: http://stackoverflow.com/questions/649614/xml-parsing...