O
O
Oleg2018-05-21 09:13:23
PHP
Oleg, 2018-05-21 09:13:23

How to parse a 900mb yml file?

You need to parse the yml file, which weighs 900mb.
Take data from it and put it in excel.
The file is huge. Recommend a library to do this quickly. Need to be done on an ongoing basis (to update prices)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
danforth, 2018-05-21
@danforth

YML is valid XML.
You can parse, for example, with this: php.net/manual/ru/class.xmlreader.php You
read streaming, process each node and write to your Excel.

P
profaller, 2018-05-21
@profaller

Parsing multi-gigabyte xml with this either - https://github.com/prewk/xml-string-streamer - everything is fine.
Good luck!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question