classes/xml/XmlParser.php
public function getData($offset)
    {
        $this->parserPosition = null;
        $this->parserLevel    = 0;
        $data        = "";
        $parser      = @\xml_parser_create();
        $filePointer = $this->getIndex()->getFile()->getFilePointer();

        if (! \is_resource($parser)) {
            $error = \error_get_last();
            throw new ReadDataIndexException(
                "Could not create a xml parser: $error[message]"
            );

        }

        \xml_set_element_handler(
            $parser,
            array($this, "onStartElement"),
            array($this, "onEndElement")
        );

        \fseek($filePointer, $offset);
        while (\is_null($this->parserPosition)
                    && $chunk = \fread($filePointer, $this->getIndex()->getFile()->getBlockSize())
        ) {
            $data .= $chunk;
            \xml_parse($parser, $chunk);

        }

        \xml_parser_free($parser);

        if (\is_null($this->parserPosition)) {
            throw new ReadDataIndexException("Did not read any data");

        }
        return \substr($data, 0, $this->parserPosition);
    }
public function getData($offset)
    {
        $this->parserPosition = null;
        $this->parserLevel    = 0;
        $data        = "";
        $parser      = @\xml_parser_create();
        $filePointer = $this->getIndex()->getFile()->getFilePointer();

        if (! \is_resource($parser)) {
            $error = \error_get_last();
            throw new ReadDataIndexException(
                "Could not create a xml parser: $error[message]"
            );

        }

        \xml_set_element_handler(
            $parser,
            array($this, "onStartElement"),
            array($this, "onEndElement")
        );

        \fseek($filePointer, $offset);
        while (\is_null($this->parserPosition)
                    && $chunk = \fread($filePointer, $this->getIndex()->getFile()->getBlockSize())
        ) {
            $data .= $chunk;
            \xml_parse($parser, $chunk);

        }

        \xml_parser_free($parser);

        if (\is_null($this->parserPosition)) {
            throw new ReadDataIndexException("Did not read any data");

        }
        return \substr($data, 0, $this->parserPosition);
    }
public function getData ( $ offset ) { $ this -> parserPosition = null ; $ this -> parserLevel = 0 ; $ data = "" ; $ parser = @ \ xml_parser_create ( ) ; $ filePointer = $ this -> getIndex ( ) -> getFile ( ) -> getFilePointer ( ) ; if ( ! \ is_resource ( $ parser ) ) { $ error = \ error_get_last ( ) ; throw new ReadDataIndexException ( "Could not create a xml parser: $error[message]" ) ; } \ xml_set_element_handler ( $ parser , array ( $ this , "onStartElement" ) , array ( $ this , "onEndElement" ) ) ; \ fseek ( $ filePointer , $ offset ) ; while ( \ is_null ( $ this -> parserPosition ) && $ chunk = \ fread ( $ filePointer , $ this -> getIndex ( ) -> getFile ( ) -> getBlockSize ( ) ) ) { $ data .= $ chunk ; \ xml_parse ( $ parser , $ chunk ) ; } \ xml_parser_free ( $ parser ) ; if ( \ is_null ( $ this -> parserPosition ) ) { throw new ReadDataIndexException ( "Did not read any data" ) ; } return \ substr ( $ data , 0 , $ this -> parserPosition ) ; }
Returns the XML container which begins at the specified offset

This method uses the event based XML parser. So public handler methods
are defined.

@param int $offset Offset of the XML container

@return string
@throws ReadDataIndexException
Returns the XML container which begins at the specified offset