2

How can I parse this txt file or how could i turn it into xml(if it's possible)? Help please.

Edit: Yes, that is not a json.

Dmitriy Zhura
  • 152
  • 1
  • 2
  • 9
  • 1
    Look at the top answer here: http://stackoverflow.com/questions/9544840/php-json-or-array-to-xml – Joel Hinz Oct 04 '13 at 17:12
  • 2
    I don't think it's a JSON, it's look like but is not. You need to write your own parser. – Kakawait Oct 04 '13 at 17:13
  • 1
    @Kakawait: it's definitely NOT json. there's no `:` between the key/value pairs. – Marc B Oct 04 '13 at 17:15
  • 2
    you need to write a parser. check PHP_ParserGenerator and PHP_Lexer on PEAR – hek2mgl Oct 04 '13 at 17:31
  • 1
    My bad, I took a brief glance and didn't notice the dissimilarities. Hope you get it sorted out. – Joel Hinz Oct 04 '13 at 17:50
  • 1
    There was a similar question related to python here that may help: http://stackoverflow.com/questions/15182398/how-do-i-convert-a-text-file-received-via-a-web-call-to-a-dictionary – Andy Oct 04 '13 at 17:54

0 Answers0