Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Example Of Using CAM::PDF Like HTML::TokeParser

by Anonymous Monk
on Oct 11, 2011 at 12:36 UTC ( [id://930805]=note: print w/replies, xml ) Need Help??


in reply to Example Of Using CAM::PDF Like HTML::TokeParser

Can you use XPath expressions to zero-in more directly on the particular nodes you're looking for? "Writing programmed logic" to navigate an XML or HTML tree is akin to writing a recursive-descent compiler by hand instead of using YACC.
  • Comment on Re: Example Of Using CAM::PDF Like HTML::TokeParser

Replies are listed 'Best First'.
Re^2: Example Of Using CAM::PDF Like HTML::TokeParser
by Limbic~Region (Chancellor) on Oct 11, 2011 at 13:17 UTC
    Anonymous Monk,
    If you are referring to the non-existant PDF parser that this thread is about, then no. The internal structure of a PDF wouldn't lend itself to XPath diving.

    If you are referring to the way I go about creating an parser using HTML::TokeParser then the answer is "it depends". Node traversal is usually the last tool in the box I reach for. I am not even opposed to using regular expressions (*gasp*) if each page is consistent enough. It all depends on how consistent one page is to the next.

    Cheers - L~R

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://930805]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-26 05:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found