xml_new

 SYNOPSIS
  Instantiate a new Expat_Type object

 USAGE
  Expat_Type xml_new()

 DESCRIPTION
  This function instantiates and returns an Expat_Type.  The
  Expat_Type is an opaque type, but its internals can be accessed
  with the dot operator like in a structure:

  `.userdata': see `xml_set_user_data'

  `.startelementhandler': see `xml_set_start_element_handler'

  `.endelementhandler': see `xml_set_end_element_handler'

  `.characterdatahandler': see `xml_set_character_data_handler'

  `.defaulthandler': see `xml_set_default_handler'

  The following properties do nothing unless the Expat parser was created
  with `xml_new_ns':

  `.startnamespacedeclhandler':  see `xml_set_start_namespace_decl_handler'

  `.endnamespacedeclhandler':  see `xml_set_end_namespace_decl_handler'

  The following properties are read-only and correspond to the C functions
  XML_GetErrorCode etc:

  `.errorcode': the error status of the parser.  This will be
  `ExpatError' or a subclass thereof, not expat's internal error
  code.

  `.errorstring': the description of the error status.

  `.currentbyteindex': the byte offset of the position.

  `.currentline':  the line number of the position. The first line is
  reported as 1.

  `.currentcolumn': the offset, from the beginning of the current line, of the
   position.

  `.parsingstatus': a struct {Int_Type parsing, Int_Type
  finalbuffer}.
   `.parsing.parsingstatus' can take on four values:

     XML_INITIALIZED
     XML_PARSING
     XML_FINISHED
     XML_SUSPENDED

   `.parsing.finalbuffer' is one if the final buffer is being processed -
   that is, when `xml_parse' was called with the third argument 1.

 SEE ALSO
  xml_parse, xml_new_ns

--------------------------------------------------------------

xml_new_ns

 SYNOPSIS
  Instantiate an Expat_Type object with namespace processing

 USAGE
  Expat_Type xml_new_ns(Char_Type sep)

 DESCRIPTION
  Constructs a new parser that has namespace processing in effect. Namespace
  expanded element names and attribute names are returned as a concatenation
  of the namespace URI, sep, and the local part of the name. This means that
  you should pick a character for sep that can't be part of a legal URI.

 SEE ALSO
  xml_parse, xml_new

--------------------------------------------------------------

xml_parse

 SYNOPSIS
  parse part of and xml document

 USAGE
  xml_parse(Expat_Type p, String_Type s, Int_Type isFinal)

 DESCRIPTION
  Parse some more of the document.  The string s is a buffer containing part
  (or perhaps all) of the document.  The isFinal parameter informs the parser
  that this is the last piece of the document.  Frequently, the last piece is
  empty (i.e. len is zero).  If a parse error occurred, an `ExpatError'
  is thrown.

 SEE ALSO
  xml_new, xml_stop_parser

--------------------------------------------------------------

xml_stop_parser

 SYNOPSIS
  stop parsing

 USAGE
  xml_stop_parser(Expat_Type p, Int_Type resumable)

 DESCRIPTION
  Stops parsing, causing `xml_parse' to return. Must be called from
  within a call-back handler, except when aborting (when resumable is 0) an
  already suspended parser.

 SEE ALSO
  xml_new, xml_resume_parser

--------------------------------------------------------------

xml_resume_parser

 SYNOPSIS
  resume parsing

 USAGE
  xml_resume_parser(Expat_Type p)

 DESCRIPTION
  Resumes parsing after it has been suspended with `xml_stop_parser'.
  Must not be called from within a handler call-back.

 SEE ALSO
  xml_new, xml_stop_parser

--------------------------------------------------------------

xml_set_start_element_handler

 SYNOPSIS
  set the start element handler

 USAGE
  xml_set_start_element_handler(Expat_Type p, Ref_Type handler)

 DESCRIPTION
  Set the handler for start elements.  The handler should have the prototype

  handler(p, name, atttributes)
  Expat_Type p;
  String_Type name;
  Array_Type[Struct_Type{name, value}] atttributes;

  The handler can acces the parser's userdata with
  `xml_get_user_data(p)' or as p.userdata.

 NOTES
  To unset the handler, set it to NULL

 SEE ALSO
  xml_new, xml_parse

--------------------------------------------------------------

xml_set_end_element_handler

 SYNOPSIS
  set the end element handler

 USAGE
  xml_set_end_element_handler(Expat_Type p, Ref_Type handler)

 DESCRIPTION
  Set the handler for end elements.  The handler should have the prototype

  handler(p, name)
  Expat_Type p;
  String_Type name;

  The handler can acces the parser's userdata with
  `xml_get_user_data(p)' or as p.userdata.

 NOTES
  To unset the handler, set it to NULL

 SEE ALSO
  xml_new, xml_parse

--------------------------------------------------------------

xml_set_start_namespace_decl_handler

 SYNOPSIS
  set the start namespace_decl handler

 USAGE
  xml_set_start_namespace_decl_handler(Expat_Type p, Ref_Type handler)

 DESCRIPTION
  Set a handler to be called when a namespace is declared. Namespace
  declarations occur inside start tags. But the namespace declaration start
  handler is called before the start tag handler for each namespace declared
  in that start tag.  The handler should have the prototype

  handler(p, prefix, uri)
  Expat_Type p;
  String_Type  or NULL prefix;
  String_Type or NULL uri;


 NOTES
  To unset the handler, set it to NULL

 SEE ALSO
  xml_new_ns, xml_parse

--------------------------------------------------------------

xml_set_end_namespace_decl_handler

 SYNOPSIS
  set the end namespace_decl handler

 USAGE
  xml_set_end_namespace_decl_handler(Expat_Type p, Ref_Type handler)

 DESCRIPTION
  Set a handler to be called when leaving the scope of a namespace
  declaration.  This will be called, for each namespace declaration, after
  the handler for the end tag of the element in which the namespace was
  declared.  The handler should have the prototype

  handler(p, prefix)
  Expat_Type p;
  String_Type or NULL prefix;


 NOTES
  To unset the handler, set it to NULL

 SEE ALSO
  xml_new_ns, xml_parse

--------------------------------------------------------------

xml_set_character_data_handler

 SYNOPSIS
  set the character data handler

 USAGE
  xml_set_character_data_handler(Expat_Type p, Ref_Type handler)

 DESCRIPTION
  Set the handler for character data.  The handler should have the prototype

  handler(p, data)
  Expat_Type p;
  String_Type data;

  The handler can acces the parser's userdata with
  `xml_get_user_data(p)' or as p.userdata.

 NOTES
  To unset the handler, set it to NULL

 SEE ALSO
  xml_new, xml_parse

--------------------------------------------------------------

xml_set_default_handler

 SYNOPSIS
  set the character data handler

 USAGE
  xml_set_default_handler(Expat_Type p, Ref_Type handler)

 DESCRIPTION
  Sets a handler for any characters in the document which wouldn't otherwise
  be handled. The handler should have the prototype

  handler(p, data)
  Expat_Type p;
  String_Type data;


 NOTES
  To unset the handler, set it to NULL

 SEE ALSO
  xml_new, xml_parse

--------------------------------------------------------------

xml_set_user_data

 SYNOPSIS
  Set the user data associated with an XML parser

 USAGE
  xml_set_user_data(Expat_Type p, AnyType data)

 DESCRIPTION
  This sets the user data pointer that gets passed to handlers.

 SEE ALSO
  xml_new, xml_get_user_data

--------------------------------------------------------------

xml_get_user_data

 SYNOPSIS
  Get the user data associated with an XML parser

 USAGE
  AnyType xml_get_user_data(Expat_Type p)

 DESCRIPTION
  This gets the user data pointer that gets passed to handlers.

 SEE ALSO
  xml_new, xml_set_user_data

--------------------------------------------------------------
