displaying contents of text in XML in java

SkyWalker

New Member
\[code\]<iata:DepartureAirport CodeContext="3">BOM</iata:DepartureAirport>\[/code\]Now for aiat:DepartureAirport as element , code context as attribute and 9W as Text , i am not able to extract 9W from the XML , but only able to extract Code Context Value \[code\]public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { tempVal = ""; if(qName.equalsIgnoreCase("iata:Airline")) { //create a new instance of employee tempEmp = new employee(); tempEmp.setType(attributes.getValue("CodeContext")); }\[/code\]
 
Back
Top