XML Editing Documentation

Post here any suggestion you have for how Go Calc could be improved

XML Editing Documentation

Postby mpantoja » Wed Mar 10, 2010 11:24 pm

I. Love. This. App. Thank you. I've been looking for a suitable replacement for MathPad on the Palm. This works just as well, but with much more shiny-shiny.

I'm pretty handy with XML and a text editor, but there isn't any documentation about the "Do's and Don'ts" for writing these calculators in a text editor. For instance:

-I have no idea if it's important to assign global/app-wide unique IDs for variables, results and calculations.
-URL encoding for spaces (%20) is the first thing I noticed when exporting calculators.
-Is there a list of all the possible tags honored by GoCalc?
-I noticed that the "category" tag has a prefix of "0%20/" for the value, but I don't know the implications of changing it to something else.

What other syntax standards should I adhere to? Do you have any other tips? I'd really prefer to work in a text editor instead of the app on the phone... it's just easier for me if I can see EVERYTHING on one screen.

Thanks again.
mpantoja
 
Posts: 3
Joined: Wed Mar 10, 2010 11:03 pm

Re: XML Editing Documentation

Postby mgkennard » Fri Mar 12, 2010 6:41 pm

Hello,

The XML exported from Go Calc isn't really best practice ;o)

However here is some information you may find useful if you are editing Go Calc exports in a text editor:

* The prefix in the category tag is the order in which the category should appear. This is because I was too lazy to define categories separately ;o) If the order is not specified then Go Calc will not import the XML file
* Strings should be URL encoded. Also & must be written as &
* Elements supported for calculations are:
* name (Text)
* notes (Text)
* category (Text- ignored when importing)
* order (Integer)
* variables (should contain one or more variable elements, each variable element can have an id)
* results (should contain one or more result elements, each result element can have an id)
* Elements supported for variable are:
* name (Text)
* value (Double)
* min (Double)
* max (Double)
* prefix (Text)
* suffix (Text)
* dp (Integer)
* slider (set to on to show the slider, anything else and the slider is off)
* step (Integer - however this is a bug should be Double, I will fix this shortly!)
* order (Integer)
* Elements support for result are:
* name (Text)
* hidden (on to hide the result, anything else and the result is shown)
* dp (Integer)
* prefix (Text)
* suffix (Text)
* formula (Text)
* order (Integer)
* The id attributes for variable and result elements are ignored when restoring a backup or importing calculations. So don't worry about these if writing calculations by hand

I hope you found this useful. Writing it, and reviewing my code, uncovered a bug so it was certainly useful for me! If you want to know anything else please ask.

Regards,

Matthew
Apps On The Move
mgkennard
Site Admin
 
Posts: 355
Joined: Mon Jul 21, 2008 2:40 pm


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest

cron