Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package de.padde.xmldemo; import java.io.IOException; import java.io.InputStream; import java.util.Vector; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.Attributes; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.XMLReader; import org.xml.sax.helpers.DefaultHandler; public class Person { private String name; private String phone; public void setName(String n) { this.name = n; } public void setPhone(String p) { this.phone = p; } public String getName() { return this.name; } public String getPhone() { return this.phone; } public String toString() { return "Person[Name: "+this.name+", Phone: "+this.phone+"]"; } } class PersonParser { public static Vector parse(InputStream in) { SAXParserFactory spf = SAXParserFactory.newInstance(); SAXParser sp; try { sp = spf.newSAXParser(); XMLReader xr = sp.getXMLReader(); PersonHandler ch = new PersonHandler(); xr.setContentHandler(ch); xr.parse(new InputSource(in)); return ch.getParsedPersons(); } catch (ParserConfigurationException e) { } catch (SAXException e) { } catch (IOException e) {} return null; } } class PersonHandler extends DefaultHandler { private enum TAGS { friends, person, name, phone } private StringBuffer tempString; private Person tempPerson; private Vector friends; public PersonHandler() { super(); this.friends = new Vector(); this.tempString = new StringBuffer(); } public Vector getParsedPersons() { return friends; } public void startDocument() { } public void endDocument() { } public void characters(char ch[], int start, int length) { tempString.append(ch,start,length); } public void startElement(String n, String l, String q, Attributes a) { switch(TAGS.valueOf(l)) { case person: tempPerson = new Person(); break; default: tempString.setLength(0); break; } } public void endElement(String n, String l, String q) { switch(TAGS.valueOf(l)) { case name: tempPerson.setName(tempString.toString()); break; case phone: tempPerson.setPhone(tempString.toString()); break; case person: friends.add(tempPerson); break; default: break; } } }