libzeep

PrevUpHomeNext

Class document

zeep::xml::document

Synopsis

// In header: <zeep/xml/document.hpp>


class document : public  {
public:
  // member classes/structs/unions

  struct notation {

    // public data members
     m_name;
     m_sysid;
     m_pubid;
  };
  // construct/copy/destruct
  ();
  (document &);
  (document &&);
  ();
  ();
  (, );
  document & (document &);
  document & (document &&);
  ~();

  // public member functions
   () ;
   ();
   () ;
   ();
   () ;
   ();
   () ;
   ();
   () ;
   ();
   () ;
   ();
   () ;
   ();
   () ;
   ();
   () ;
   ();
  doc_type () ;
   (, , 
                   );
   (doc_type &);
   () ;
   ();
   () ;
   ();
   () ;
  template<typename T>  (, );
  template<typename T>  (, );
   (document &) ;
   (document &) ;
   ();
  template<typename Callback>  ();
   () ;
   ();
   () ;
   ();
  element * ();
  element * () ;
  node * ();
  node * () ;

  // friend functions
   (, document &);
   (, document &);

  // protected member functions
   (const_iterator, node *);
   (, , );
   (, , 
                           );
   (, );
   ();
   (, );
   ();
   ();
   ();
   (, );
   ();
   (, , 
                          );
   (, , 
                           );
   
  (, , 
                      );
   ();
   (, format_info) ;
};

Description

document public construct/copy/destruct

  1. ();
    Constructor for an empty document.
  2. (document & doc);
    Copy constructor.
  3. (document && other);
    Move constructor.
  4. ( s);
    Constructor that will parse the XML passed in argument using default settings s.
  5. ( is);
    Constructor that will parse the XML passed in argument using default settings is.
  6. ( is,  base_dir);
    Constructor that will parse the XML passed in argument is. This constructor will also validate the input using DTD's found in base_dir.
  7. document & (document & doc);
    Copy operator=.
  8. document & (document && other);
    Move operator=.
  9. ~();

document public member functions

  1.  () ;

    options for parsing validating uses a DTD if it is defined

  2.  ( validate);
  3.  () ;
    validating_ns: when validating take the NS 1.0 specification into account
  4.  ( validate);
  5.  () ;

    preserve cdata, preserves CDATA sections instead of converting them into text nodes.

  6.  ( p);
    if p is true, the CDATA sections will be preserved when parsing XML, if p is false, the content of the CDATA will be treated as text
  7.  () ;
    collapse means replacing e.g. <foo></foo> with <foo/>
  8.  ( c);
    if c is true, empty tags will be replaced, i.e. write <foo/> instead of <foo></foo>
  9.  () ;
    collapse 'empty elements' according to HTML rules
  10.  ( f);
    if c is true, 'empty elements' will be collapsed according to HTML rules
  11.  () ;
    whether to write out comments
  12.  ( s);
    if s is true, comments will not be written
  13.  () ;
    whether to escape white space
  14.  ( e);
    if e is true, white space will be written as XML entities
  15.  () ;
    whether to escape double quotes
  16.  ( e);
    if e is true, double quotes will be written as "
  17.  () ;
    whether to place a newline after a prolog
  18.  ( w);
    if w is true, a newline will be written after the XML prolog
  19. doc_type () ;
    Get the doctype as parsed.
  20.  ( root,  pubid, 
                      dtd);
    Set the doctype to write out.
  21.  (doc_type & doctype);
    Set the doctype to write out.
  22.  () ;
    whether to write a XML prolog
  23.  ( w);
    if w is true, an XML prolog will be written
  24.  () ;
    whether to write a DOCTYPE
  25.  ( f);
    if f is true a DOCTYPE will be written
  26.  () ;
    Check the doctype to see if this is supposed to be HTML5.
  27. template<typename T>  ( name,  data);
    Serialization support.

    Serialize data into a document containing name as root node

  28. template<typename T>  ( name,  data);
    Serialization support.

    Deserialize root node with name name into data.

  29.  (document & doc) ;
    Compare two xml documents.
  30.  (document & doc) ;
  31.  ( path);

    If you want to validate the document using DTD files stored on disk, you can specifiy this directory prior to reading the document.

  32. template<typename Callback>  ( cb);

    If you want to be able to load external documents other than trying to read them from disk you can set a callback here.

  33.  () ;
    The text encoding as detected in the input.
  34.  ( enc);
    The text encoding to use for output.
  35.  () ;
    XML version, should be either 1.0 or 1.1.
  36.  ( v);
    XML version, should be either 1.0 or 1.1.
  37. element * ();
    The root node for this node.
  38. element * () ;
    The root node for this node.
  39. node * ();
  40. node * () ;

document friend functions

  1.  ( os, document & doc);
    Write out the document.
  2.  ( is, document & doc);
    Read in a document.

document protected member functions

  1.  (const_iterator pos, node * n);
  2.  ( encoding,  standalone,  version);
  3.  ( name,  uri, 
                              atts);
  4.  ( name,  uri);
  5.  ( data);
  6.  ( target, 
                                       data);
  7.  ( comment);
  8.  ();
  9.  ();
  10.  ( prefix, 
                                    uri);
  11.  ( prefix);
  12.  ( root, 
                             publicId, 
                             uri);
  13.  ( name,  sysid, 
                              pubid);
  14.  
    ( base,  pubid, 
                         sysid);
  15.  ( data);
  16.  ( os, format_info fmt) ;
    low level routine for writing out XML

    This method is usually called by operator<<(std::ostream&, zeep::xml::document&)


PrevUpHomeNext