Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a dadabase whose structure is really simple.

<ws>
    <e>
        <k>base64_encoded_string</k>
        <v>base64_encoded_string</v>
    </e>
    <e>
        <k>...</k>
        <v>...</v>
    </e>
    ...
</ws>

I need to convert it to simple json in a format like this:

{"k":"v",
 "k":"v",
 ...
}

My first thought was importing it through MS Excel's xml parser, but there is a problem with maximum length size Excel cell can be, which is 32kB, but some the values in my database can go up to 600kB.

My next thought was to use Notepad++ with macros to decode base64 and then to use search and replace to reformat the structure of the file, but it seems that N++'s macro recorder doesn't support plug-in commands which is necessary to decode the b64.

What can I do to convert my database?

(In case it might help, basically all I need is to convert Opera 12.16 extension storage to Firefox add-on storage).

Thanks for any help.

share|improve this question
    
Have you ever programmed? This could be done pretty easily with Python. –  nerdwaller Jan 11 '14 at 16:33
    
not seriously and not in Python –  Marek D Jan 11 '14 at 16:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.