Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: XML::Parser Tutorial

by Mike Blume (Initiate)
on Aug 21, 2008 at 18:10 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://705917]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-16 11:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found