Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

As a general note on working with xpath: it pays off to use a decent XML editor. They support interactively constructing xpath expressions and validate them on the fly. You continuously see the results returned by the expression. In my experience this saves a lot of time debugging:) Before you use the expression in your script you have validated that it's correct. In your example it reports syntax errors e.g. 'XPath syntax error at char 25 in ... Unexpected token "<numeric literal>" after axis name'. While you could still argue that the message could be improved, it's better then the "unrecongnised expression in handler" message. I recommend you to take a look at oXygen or XMLspy. They can ease your "xml-life" considerably (try debugging a xslt!). (There are many free/open source XML editors available but IMHO none of them even comes close to the commercial ones.)

Cheers

Harry


In reply to Re: XML::Twig and handles on regex/xpath by dHarry
in thread XML::Twig and handles on regex/xpath by Eythil

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-03-28 17:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found