If anyone is interested, I wrote a small program (total of 6 lines,
not counting main() and includes) that reads in a LLSD formatted XML
and writes it back out, formatting it like the saved settings version
as compared to the default settings formatting, and has the advantage
of putting all the settings in alphabetical order also.

Don't know if this would be of any interest to anyone except for
making the default settings files a little more organized.

It should compile fine on mac and linux, haven't tested them though.
For compiling, set the includes to the llcommon directory of the
normal viewer and the include directory of the third party libs of the
viewer and link it against llcommon.lib (or the equivalent on
mac/linux). then make sure the libapr dll's and llcommon.dll in the
same directory as the output executable and it will work on the file
"target.xml" in its working directory, reading from it and overwriting
it when its done.

As for the license of the following code below, Public domain or
WTFPL, whichever you want.

I also can't and won't provide any help with it either.

The full program is:

#include <cstdio>
#include "llsdserialize.h"
#include <fstream>
#include <iostream>


int main(int argc, char* argv[])
{
        LLSD tmp;
        std::ifstream in("target.xml");
        LLSDSerialize::fromXML(tmp,in);
        std::ofstream out("target.xml");
        LLSDSerialize::toPrettyXML(tmp,out);
        return 0;
}
_______________________________________________
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Reply via email to