These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

XML API WalletJournal

Author
Naroman Koncheniy
Imperial Academy
Amarr Empire
#1 - 2016-10-10 11:58:42 UTC
Hello, today i ran into a problem when trying to parse a xml in to json with xml2js or xmljson both give same errors about unclosed tag. or maybe my parser is ****.


[Error: Unclosed root tag
Line: 7
Column: 279
Char: ]
undefined
[Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: a]
undefined
[Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: /]
undefined
[Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: e]
undefined
[Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: 2]
undefined
[Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: t]
undefined
[Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: g]
undefined
[Error: Non-whitespace before first tag.
Line: 0
Column: 2
Char: a]
undefined
[Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: "]
undefined
[Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: e]
undefined





Naroman Koncheniy
Imperial Academy
Amarr Empire
#2 - 2016-10-10 12:28:03 UTC
https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_walletjournal.html

here is the example of a response, when i copied it and used to parse it to json it gave no error. but when i do actuall query it gives me an error of unclosed tag somewhere.
Naroman Koncheniy
Imperial Academy
Amarr Empire
#3 - 2016-10-10 12:57:52 UTC
so far used tons of parser and all give the same errors. while others calls are parsed very well.

so far used libs ObjTree, xml2js, xmljson, xml-objtree()edited version).
Naroman Koncheniy
Imperial Academy
Amarr Empire
#4 - 2016-10-10 16:02:18 UTC
For all who uses NODEJS issue is solved. it is was my super bad day and didnt notice it.

When you do query for a big document wait for buffer to finish accepting chunks.. and add all chunks to your variable. then parse it.