Home | History | Annotate | Download | only in libxmlrpg
      1       * Summary: the XML document serializer
      2       * Description: API to save document or subtree of document
      3       *
      4       * Copy: See Copyright for the status of this software.
      5       *
      6       * Author: Patrick Monnerat <pm (a] datasphere.ch>, DATASPHERE S.A.
      7 
      8       /if not defined(XML_XMLSAVE_H__)
      9       /define XML_XMLSAVE_H__
     10 
     11       /include "libxmlrpg/xmlversion"
     12       /include "libxmlrpg/tree"
     13       /include "libxmlrpg/encoding"
     14       /include "libxmlrpg/xmlIO"
     15 
     16       /if defined(LIBXML_OUTPUT_ENABLED)
     17 
     18       * xmlSaveOption:
     19       *
     20       * This is the set of XML save options that can be passed down
     21       * to the xmlSaveToFd() and similar calls.
     22 
     23      d xmlSaveOption   s             10i 0 based(######typedef######)           enum
     24      d  XML_SAVE_FORMAT...                                                      Format save output
     25      d                 c                   X'0001'
     26      d  XML_SAVE_NO_DECL...                                                     Drop xml declaration
     27      d                 c                   X'0002'
     28      d  XML_SAVE_NO_EMPTY...                                                    No empty tags
     29      d                 c                   X'0004'
     30      d  XML_SAVE_NO_XHTML...                                                    No XHTML1 specific
     31      d                 c                   X'0008'
     32      d  XML_SAVE_XHTML...                                                       Frce XHTML1 specific
     33      d                 c                   X'0010'
     34      d  XML_SAVE_AS_XML...                                                      Frce XML on HTML doc
     35      d                 c                   X'0020'
     36      d  XML_SAVE_AS_HTML...                                                     Frce HTML on XML doc
     37      d                 c                   X'0040'
     38      d  XML_SAVE_WSNONSIG...                                                    Fmt w/ non-sig space
     39      d                 c                   X'0080'
     40 
     41      d xmlSaveCtxtPtr  s               *   based(######typedef######)
     42 
     43      d xmlSaveToFd     pr                  extproc('xmlSaveToFd')
     44      d                                     like(xmlSaveCtxtPtr)
     45      d  fd                           10i 0 value
     46      d  encoding                       *   value options(*string)               const char *
     47      d  options                      10i 0 value
     48 
     49      d xmlSaveToFilename...
     50      d                 pr                  extproc('xmlSaveToFilename')
     51      d                                     like(xmlSaveCtxtPtr)
     52      d  filename                       *   value options(*string)               const char *
     53      d  encoding                       *   value options(*string)               const char *
     54      d  options                      10i 0 value
     55 
     56      d xmlSaveToBuffer...
     57      d                 pr                  extproc('xmlSaveToBuffer')
     58      d                                     like(xmlSaveCtxtPtr)
     59      d  buffer                             value like(xmlBufferPtr)
     60      d  encoding                       *   value options(*string)               const char *
     61      d  options                      10i 0 value
     62 
     63      d xmlSaveToIO     pr                  extproc('xmlSaveToIO')
     64      d                                     like(xmlSaveCtxtPtr)
     65      d  iowrite                            value like(xmlOutputWriteCallback)
     66      d  ioclose                            value like(xmlOutputCloseCallback)
     67      d  ioctx                          *   value                                void *
     68      d  encoding                       *   value options(*string)               const char *
     69      d  options                      10i 0 value
     70 
     71      d xmlSaveDoc      pr            20i 0 extproc('xmlSaveDoc')
     72      d  ctxt                               value like(xmlSaveCtxtPtr)
     73      d  doc                                value like(xmlDocPtr)
     74 
     75      d xmlSaveTree     pr            20i 0 extproc('xmlSaveTree')
     76      d  ctxt                               value like(xmlSaveCtxtPtr)
     77      d  node                               value like(xmlNodePtr)
     78 
     79      d xmlSaveFlush    pr            10i 0 extproc('xmlSaveFlush')
     80      d  ctxt                               value like(xmlSaveCtxtPtr)
     81 
     82      d xmlSaveClose    pr            10i 0 extproc('xmlSaveClose')
     83      d  ctxt                               value like(xmlSaveCtxtPtr)
     84 
     85      d xmlSaveSetEscape...
     86      d                 pr            10i 0 extproc('xmlSaveSetEscape')
     87      d  ctxt                               value like(xmlSaveCtxtPtr)
     88      d  escape                             value like(xmlCharEncodingOutputFunc)
     89 
     90      d xmlSaveSetAttrEscape...
     91      d                 pr            10i 0 extproc('xmlSaveSetAttrEscape')
     92      d  ctxt                               value like(xmlSaveCtxtPtr)
     93      d  escape                             value like(xmlCharEncodingOutputFunc)
     94 
     95       /endif                                                                    LIBXML_OUTPUT_ENABLD
     96       /endif                                                                    XML_XMLSAVE_H__
     97