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/xmlTypesC"
     13       /include "libxmlrpg/tree"
     14       /include "libxmlrpg/encoding"
     15       /include "libxmlrpg/xmlIO"
     16 
     17       /if defined(LIBXML_OUTPUT_ENABLED)
     18 
     19       * xmlSaveOption:
     20       *
     21       * This is the set of XML save options that can be passed down
     22       * to the xmlSaveToFd() and similar calls.
     23 
     24      d xmlSaveOption   s             10i 0 based(######typedef######)           enum
     25      d  XML_SAVE_FORMAT...                                                      Format save output
     26      d                 c                   X'0001'
     27      d  XML_SAVE_NO_DECL...                                                     Drop xml declaration
     28      d                 c                   X'0002'
     29      d  XML_SAVE_NO_EMPTY...                                                    No empty tags
     30      d                 c                   X'0004'
     31      d  XML_SAVE_NO_XHTML...                                                    No XHTML1 specific
     32      d                 c                   X'0008'
     33      d  XML_SAVE_XHTML...                                                       Frce XHTML1 specific
     34      d                 c                   X'0010'
     35      d  XML_SAVE_AS_XML...                                                      Frce XML on HTML doc
     36      d                 c                   X'0020'
     37      d  XML_SAVE_AS_HTML...                                                     Frce HTML on XML doc
     38      d                 c                   X'0040'
     39      d  XML_SAVE_WSNONSIG...                                                    Fmt w/ non-sig space
     40      d                 c                   X'0080'
     41 
     42      d xmlSaveCtxtPtr  s               *   based(######typedef######)
     43 
     44      d xmlSaveToFd     pr                  extproc('xmlSaveToFd')
     45      d                                     like(xmlSaveCtxtPtr)
     46      d  fd                           10i 0 value
     47      d  encoding                       *   value options(*string)               const char *
     48      d  options                      10i 0 value
     49 
     50      d xmlSaveToFilename...
     51      d                 pr                  extproc('xmlSaveToFilename')
     52      d                                     like(xmlSaveCtxtPtr)
     53      d  filename                       *   value options(*string)               const char *
     54      d  encoding                       *   value options(*string)               const char *
     55      d  options                      10i 0 value
     56 
     57      d xmlSaveToBuffer...
     58      d                 pr                  extproc('xmlSaveToBuffer')
     59      d                                     like(xmlSaveCtxtPtr)
     60      d  buffer                             value like(xmlBufferPtr)
     61      d  encoding                       *   value options(*string)               const char *
     62      d  options                      10i 0 value
     63 
     64      d xmlSaveToIO     pr                  extproc('xmlSaveToIO')
     65      d                                     like(xmlSaveCtxtPtr)
     66      d  iowrite                            value like(xmlOutputWriteCallback)
     67      d  ioclose                            value like(xmlOutputCloseCallback)
     68      d  ioctx                          *   value                                void *
     69      d  encoding                       *   value options(*string)               const char *
     70      d  options                      10i 0 value
     71 
     72      d xmlSaveDoc      pr                  extproc('xmlSaveDoc')
     73      d                                     like(xmlClong)
     74      d  ctxt                               value like(xmlSaveCtxtPtr)
     75      d  doc                                value like(xmlDocPtr)
     76 
     77      d xmlSaveTree     pr                  extproc('xmlSaveTree')
     78      d                                     like(xmlClong)
     79      d  ctxt                               value like(xmlSaveCtxtPtr)
     80      d  node                               value like(xmlNodePtr)
     81 
     82      d xmlSaveFlush    pr            10i 0 extproc('xmlSaveFlush')
     83      d  ctxt                               value like(xmlSaveCtxtPtr)
     84 
     85      d xmlSaveClose    pr            10i 0 extproc('xmlSaveClose')
     86      d  ctxt                               value like(xmlSaveCtxtPtr)
     87 
     88      d xmlSaveSetEscape...
     89      d                 pr            10i 0 extproc('xmlSaveSetEscape')
     90      d  ctxt                               value like(xmlSaveCtxtPtr)
     91      d  escape                             value like(xmlCharEncodingOutputFunc)
     92 
     93      d xmlSaveSetAttrEscape...
     94      d                 pr            10i 0 extproc('xmlSaveSetAttrEscape')
     95      d  ctxt                               value like(xmlSaveCtxtPtr)
     96      d  escape                             value like(xmlCharEncodingOutputFunc)
     97 
     98       /endif                                                                    LIBXML_OUTPUT_ENABLD
     99       /endif                                                                    XML_XMLSAVE_H__
    100