0

How to read 550 MB XML file in php? I couldn't put data in php file like:

$xml =<<<EOT 
<?xml version="1.0" encoding="utf-8"?>
<data>
.....
...
</data>
EOT; 

In addition, when i did from command line, it "kill" the process. Any idea ?

Edited by pritaeas: Moved.

3
Contributors
7
Replies
27
Views
4 Years
Discussion Span
Last Post by PriteshP23
0

@pzuurveen & @Unimportant :

I had already checked it out. If possible, I would like to have other input.

Anybody have any idea to solve it out ???

0

What do you mean by other input?
You can modify the DOMXPath after it is constructed, though it takes a little doing.

I'm sorry, your request seems ambiguous at this moment. You'll have to literate yourself more specifically if you would like to find a specific answer.

0

from php.net about xmlreader

The XMLReader extension is an XML Pull parser. The reader acts as a cursor going forward on the document stream and stopping at each node on the way.

That means that the file is not loaded into memory but can be read one part at a time.
There is a usefull example on the intro page

0

I had used DomDocument. Is it possible to read large XML file with this?

THANKS IN ADVANCED.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.