# SAX (Simple API for XML) Examples

Hint: if you wish to look at the ooRexx code with syntax highlighting, then you can use the free and open-source editor `"[g]vim"`, which is available for practically all platforms and can be downloaded from its homepage at http://www.vim.org/.

. <directory> (List of this directory)
  Display all of this directory's files and directories.
.. <directory> (List of parent directory)
  Display all of the parent directory's files and directories.
DTD <directory> (document type definitions)
  Display the document type definitions (DTD) used in the test file `www.rexxla.org.xhtml`, such that the parser becomes able to validate.
`www.rexxla.org.xhtml`
  A properly formatted `xhtml` (XML) file serving as test file.
readme.txt
  Explains briefly how to invoke each script.
01_getText.rex
  Script to extract text from an XML file.
  On Windows use `rexxj` or `rexxj.cmd` instead of `rexxj.sh`:
  `rexxj.sh 01_getText.rxj www.rexxla.org.xhtml`
02_getText.rex
  Script to extract text from an XML file, suppressing duplicate empty lines.
  On Windows use `rexxj` or `rexxj.cmd` instead of `rexxj.sh`:
  `rexxj.sh 02_getText.rxj www.rexxla.org.xhtml`
03_listElementNames.rxj
  Script dumping the element names in document order.
  On Windows use `rexxj` or `rexxj.cmd` instead of `rexxj.sh`:
  `rexxj.sh 03_listElementNames.rxj www.rexxla.org.xhtml`
04_listElementNamesIndented.rxj
  Script dumping the element names in document order, indenting output according to nesting level.
  On Windows use `rexxj` or `rexxj.cmd` instead of `rexxj.sh`:
  `rexxj.sh 04_listElementNamesIndented.rxj www.rexxla.org.xhtml`
05_listElementNamesIndentedWithAttributes.rxj
  Same as `04_listElementNamesIndented.rxj` and in addition dumping attributes, if any defined with an element.
  On Windows use `rexxj` or `rexxj.cmd` instead of `rexxj.sh`:
  `rexxj.sh 05_listElementNamesIndentedWithAttributes.rxj www.rexxla.org.xhtml`
06_listElementNamesIndentedWithAttributes_DOES_NOT_USE_DTD.rxj
  Same as `05_listElementNamesIndentedWithAttributes.rxj`, but without validation (ignores any DTD).
  On Windows use `rexxj` or `rexxj.cmd` instead of `rexxj.sh`:
  `rexxj.sh 06_listElementNamesIndentedWithAttributes_DOES_NOT_USE_DTD.rxj www.rexxla.org.xhtml`
07_listElementNamesAsTree.rxj
  Displays elements in a graphical (hierarchical) tree.
  On Windows use `rexxj` or `rexxj.cmd` instead of `rexxj.sh`:
  `rexxj.sh 07_listElementNamesAsTree.rxj www.rexxla.org.xhtml`

Rony G. Flatscher, 2010-08-22 ... 2021-05-30, Wien/Vienna, Austria, Europe