If you're wanting to actually work with XML data as it was intended, treating it as a tree, try http://us2.php.net/manual/en/book.simplexml.php .
XML Parser
- Introduzione
- Installazione/Configurazione
- Costanti predefinite
- Event Handlers
- Case Folding
- Error Codes
- Character Encoding
- Esempi
- XML Parser Funzioni
- utf8_decode — Converte una stringa con caratteri ISO-8859-1 codificati con UTF-8 in formato ISO-8859-1 singolo byte
- utf8_encode — Codifica una stringa da ISO-8859-1 a UTF-8
- xml_error_string — Restituisce la stringa di errore dal parser XML
- xml_get_current_byte_index — Restituisce l'indice del byte corrente per un parser XML
- xml_get_current_column_number — Restituisce il numero di colonna corrente per un parser XML
- xml_get_current_line_number — Restituisce il numero di linea corrente per un parser XML
- xml_get_error_code — Restituisce il codice di errore dal parser XML
- xml_parse_into_struct — Analizza i dati XML in una struttura array
- xml_parse — Inizia il parsing di un documento XML
- xml_parser_create_ns — Crea un parser XML con il supporto dello spazio dei nomi
- xml_parser_create — Crea un parser XML
- xml_parser_free — Cancella un parser XML
- xml_parser_get_option — Restituisce le opzioni da un parser XML
- xml_parser_set_option — Valorizza le opzioni di un parser XML
- xml_set_character_data_handler — Valorizza il gestore dei dati
- xml_set_default_handler — Imposta il gestore predefinito
- xml_set_element_handler — Valorizza i gestori di inizio e fine elemento
- xml_set_end_namespace_decl_handler — Valorizza il gestore della dichiarazione dello spazio dei nomi
- xml_set_external_entity_ref_handler — Valorizza il gestore dei riferimenti a entità esterne
- xml_set_notation_decl_handler — Valorizza il gestore delle dichiarazione delle notazioni
- xml_set_object — Utilizza il parser XML all'interno di un oggetto
- xml_set_processing_instruction_handler — Imposta il gestore delle istruzioni di processo (PI)
- xml_set_start_namespace_decl_handler — Imposta il gestore della dichiarazione dello spazio dei nomi d'inizio
- xml_set_unparsed_entity_decl_handler — Imposta il gestore delle dichiarazioni di entità non analizzate
pavel dot lishin at gmail dot com ¶
3 years ago
nat ¶
3 years ago
An event-based parser such XML Parser is preferable for large files, because tree-based parsers must fully load the file into memory in order to parse the XML. Event-based parsers do not need to load the entire file into memory to begin parsing.
marcgear at gmail dot com ¶
2 years ago
While this SAX event based parser is better for memory management than the tree based parsers of SimpleXML and DOM, the pull-based parser XMLReader is much easier to use than the xml_parser_* functions, and still doesn't require loading the file into memory.
