35 |
|
SAXParser saxParser = factory.newSAXParser(); |
36 |
|
saxParser.parse(xml, new XMLPacketParser(packet)); |
37 |
|
|
38 |
– |
// Print out the entire contents of the packet's HashMap. |
39 |
– |
System.out.println("XMLPacket contents: -"); |
40 |
– |
packet.printAll(); |
41 |
– |
|
38 |
|
} |
39 |
< |
catch (Exception e) { |
39 |
> |
catch (IOException e){ |
40 |
> |
System.out.println("IOException: "+e); |
41 |
> |
} |
42 |
> |
catch (Throwable t) { |
43 |
|
System.out.println("XMLPacketMaker - I just received an XML packet that did not contain valid XML."); |
44 |
< |
System.out.println(e); |
44 |
> |
//System.out.println(e); |
45 |
> |
t.printStackTrace(); |
46 |
|
return null; |
47 |
|
} |
48 |
|
|