[XML-SIG] curses xml browser/editor released
tan@pobox.com
tan@pobox.com
Sat, 8 Jul 2000 15:20:34 -0700
folks,
I've put a python version of my (formerly perl) XML
browser/editor at
http://www.powerandlove.com/software/xml_browser
I wrote this because I wanted a character-cell (text user
interface) XML browser (with node editor) that worked like
Lynx in its arrow key navigation mode.
It uses PyNcurses and 4DOM-XML-Sig (which I believe is is the same as
4DOM 0.9.3).
constraints on the xml files this browser works with
This browser will display, and allow the user to browse all
of, any XML file which contains only element, attribute and
text nodes. (The perl version displays the attributes -
I'll soon add that feature to the python version.)
Example: the browser will display the following XML
document (minus the annotations):
<doc>living things
<ul>animate objects <-- the title of a branch
<ul>plants <-- the title of a branch
<li>trees</li> <-- leaf node
</ul>
<ul>animals
<li>dogs</li>
<li>cats</li>
</ul>
</ul>
</doc>
as:
living things (black text)
animate objects (red text)
If the user presses the right arrow s/he'll see:
* animate objects (black text)
plants (red text - currently selected link)
animals (blue text - unselected link)
If s/he presses the down arrow once , s/he will see:
* animate objects
plants (blue text - unselected link)
animals (red text - currently selected link)
If the user presses the right arrow s/he'll see:
* animals (black text - the name of the parent)
* dogs (black text - the value of a text
node)
* cats (black text - the value of a text
node)
To go up to the parent (animals), the user presses the left
arrow.
I.e., you navigate using your arrow keys, as in Lynx:
left go up one level (to the current node's parent)
up move the cursor to the next higher link
down move the cursor to the next lower link
right go to the node the current link points to
paging
p previous page
n next page
Pressing 'e' at any level will allow you to edit a node in
that level.
branch nodes
- the browser uses the value of a branch's text node
as the branch's title if it exists, else it uses the
branch's tag name
tags
- one tag is the same as the next to the browser
- e.g., the value of a text node of an element
whose tag is 'title' will not be treated as a title
I'd love to have help with this project. For instance, it'd
be nice to have a version for MS-DOS. (I know nothing about
DOS character-cell programming.)
Tom
--
Tom Newman tan@pobox.com