I working on xml sax parser to parse xml files and below is my code
xml file code:
Registered Nurse-Epilepsy&
To get the text content of a node, you need to implement a characters method. E.g.
class Exact(xml.sax.handler.ContentHandler):
def __init__(self):
self.curpath = []
def startElement(self, name, attrs):
print name,attrs
def endElement(self, name):
print 'end ' + name
def characters(self, content):
print content
Would output:
job
title
Registered Nurse-Epilepsy
end title
job-code
881723
end job-code
detail-url
http://search.careers-hcanorthtexas.com/s/Job-Details/Registered-Nurse-Epilepsy-Job/Medical-City/xjdp-cl289619-jf120-ct2181-jid4041800?s_cid=Advance
end detail-url
(sniped)