Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: XML::Parser Tutorial

by Mike Blume (Initiate)
on Aug 21, 2008 at 18:10 UTC ( #705917=note: print w/ replies, xml ) Need Help??


in reply to XML::Parser Tutorial

I realize this article was written some time ago, but it seems to still apply to XML::Parser My question is: How do you parse a self containing element using this library? A web page I'm trying to parse is structured similar to the following:

<class> <student name="Student1" race="Fast" age="Std" /> <student name="Student2" race="Slow" age="New" /> <student name="Student3" race="Okay" age="Old" /> </class>
Using XML::Parser in the same manner as you did in the article, did not work for me. I'm assuming this is because there is no start/end tag for "student"; it is self containing. I'm thinking that I might have to make my own parser, but if there is already one in this module I can use, I'm all for it :) TY, mike


Comment on Re: XML::Parser Tutorial
Download Code
Re^2: XML::Parser Tutorial
by Anonymous Monk on Jun 01, 2012 at 16:27 UTC
    search for parsing xml attributes. I'm trying to figure out a similar parsing issues. It appears that these are xml elements with no values, only attributes? I haven't been able to find much on this.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2015-07-03 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (49 votes), past polls