Annotation of gpl/axl/py-axl/doc/axl.rst, revision 1.1.1.1

1.1       misho       1: :mod:`axl` --- PyAxl base module
                      2: ================================
                      3: 
                      4: .. currentmodule:: axl
                      5: 
                      6: =====
                      7: Intro
                      8: =====
                      9: 
                     10: :mod:`axl` includes static functions that are used to bootstrap some
                     11: objects (like :class:`axl.Doc`) with initialized content.
                     12: 
                     13: ==========
                     14: Module API
                     15: ==========
                     16: 
                     17: .. function:: parse (document, [size])
                     18:    
                     19:    Allows to parse a XML document described by document parameter and
                     20:    its corresponding size::
                     21: 
                     22:       # parse document
                     23:       (doc, err) = axl.parse ("<document><child><next /></child></document>")
                     24:       if err:
                     25:          print ("Failed to parse document, error found: " + err.msg)
                     26: 
                     27:   :param document: A xml document content to be parsed.
                     28:   :type  document: String 
                     29: 
                     30:   :rtype: Returns a tuple with (:class:`axl.Doc`, :class:`axl.Error`) having the document defined in the case of proper parsing, or having defined axl.Error in the case an error is found.
                     31: 
                     32: .. function:: file_parse (path)
                     33:    
                     34:    Allows to parse a XML document found at the provided path::
                     35: 
                     36:       # parse document
                     37:       (doc, err) = axl.file_parse ("/tmp/salida.txt")
                     38:       if err:
                     39:          print ("Failed to parse document, error found: " + err.msg)
                     40: 
                     41:   :param path: Path to the document to be loaded.
                     42:   :type  path: String 
                     43: 
                     44:   :rtype: Returns a tuple with (:class:`axl.Doc`, :class:`axl.Error`) having the document defined in the case of proper parsing, or having defined :class:`axl.Error` in the case an error is found.
                     45: 
                     46: .. function:: dtd_file_parse (path)
                     47:    
                     48:    Allows to parse DTD definition found on the provided path::
                     49: 
                     50:       # parse dtd content
                     51:       (dtd, err) = axl.parse ("<document><child><next /></child></document>")
                     52:       if err:
                     53:          print ("Failed to parse dtd, error found: " + err.msg)
                     54: 
                     55:   :param path: Path to the DTD file definition.
                     56:   :type  path: String 
                     57: 
                     58:   :rtype: Returns a tuple with (:class:`axl.Dtd`, :class:`axl.Error`) having the DTD defined in the case of proper parsing, or having defined :class:`axl.Error` in the case an error is found.
                     59: 
                     60: 
                     61: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>