Poniższy obrazek przedstawia jak wygląda tabela
Zdjęcia
class ksiazka extends SAXParser { public $books; public function startElement($parser, $name, $attributes) { $this->tagName = $name; if ($name == "book" && $attributes['id'] % 2 == 1) { $this->books = new Books(); $this->books->ID = $attributes['id']; } } public function characterData($parser, $data) { if ($this->tagName == "title") { $this->books->TITLE = $data; } } public function endElement($parser, $name) { $this->tagName = ""; if ($name == "book") { $this->book_tab[] = $this->books; } } }