Most of the items on the Menu require very little
explaination.
-> (Ctrl-O),
-> (Ctrl-S),
->, and
->
all open, save, and close the current XML parser description as a
Python module.
By default, XMLObjApp performs a sanity test before saving the parser file. If
the test fails, XMLObjApp will alert you and
ask if the file should be saved anyhow. Saving a parser with errors in it
is risky as it may not be possible to load the parser later to fix the
errors.
You may disable this pre-save test
in the preferences.
-> (Ctrl-T)
runs a quick check on the parser you have created to make sure it makes
sense. It checks for obvious problems, such as putting illegal characters
in attribute names and defining a class multiple times, to
more subtle mistakes, such as neglecting to define a class
you use.
If successful, the will pop up a
simple dialog to notify you of success:
On a failure, will open a list of
errors and warnings:
The failure messages are pretty self-explanitory, so I won't waste time
detailing each one. Error messages are marked with a
symbol and warnings with a
symbol. Click on any message link to jump
to the appropriate class page and field that caused the
problem. Errors certainly need to be fixed. Warnings may need to be fixed.
One of XMLObjApp's more convenient features is
the
->
menu item. This function imports an XML file and takes some guesses about
what sorts of classes, attributes, and children should go
into your parser. The configuration will almost certainly
not be correct, but it should save you tons of time
in creating your parser. Simply import your XML file and then tweak all
the settings until they match your file's structure.
Note
By default,
->
closes the current parser before importing the XML document. You may
change this setting in the
preferences.
->
allows you to set all of the following:
-
Indention amount:
By default, XMLObjApp indents four spaces
whenever creating a subordinate source code block. You may tweak
this value here or instruct XMLObjApp to
use a single tab character instead.
Changing this setting may have a profound effect on any code you
have manually edited into your
parser. I strongly recommend you pick a value and stick with it.
-
Column wrap:
By default, XMLObjApp wraps source code
it generates at column 79. You may tweak this value here.
-
Recently used file list:
By default, XMLObjApp remembers the four
most recently used parser files and keeps them on your
menu for easy access. You may tweak the
number of files remembered here.
-
Import XML:
By default, XMLObjApp closes the current
parser file before importing an XML
document. You may also set the application to leave the
current parser open (thereby adding new classes to it) or to ask if
the current file should be closed before importing an XML document.
-
Special attributes:
This section of the preferences dialog allows you to set the default
special attributes to use whenever a
parser class is created.
-
Sanity test:
By default, XMLObjApp performs a
sanity test before saving the
parser file. If the test fails, XMLObjApp
will alert you and ask if the file should be saved anyhow. Saving a
parser with errors in it is risky as it may not be possible to load
the parser later to fix the errors.
You may disable this pre-save test here.
-
Program paths:
XMLObjApp will guess appropriate values
for the browser and help program paths. You may customize these
values here.
->
closes the XMLObjApp application.