40 #ifndef _xmlwrapp_document_h_ 41 #define _xmlwrapp_document_h_ 46 #include "xmlwrapp/export.h" 77 struct xpath_context_impl;
104 XMLWRAPP_DEPRECATED(
"use xml::document(xml::node(root_name)) instead")
105 explicit
document(const
char *root_name);
184 const
node& get_root_node() const;
194 node& get_root_node();
202 void set_root_node(const
node& n);
211 const
std::
string& get_version() const;
219 void set_version(const
char *version);
227 std::
string get_encoding() const;
238 void set_encoding(const
char *encoding);
248 bool get_is_standalone() const;
256 void set_is_standalone(
bool sa);
269 bool process_xinclude();
278 bool has_internal_subset() const;
287 bool has_external_subset() const;
319 bool validate(const
char *dtdname);
329 size_type size() const;
339 node::iterator begin();
349 node::const_iterator begin() const;
357 node::iterator end();
365 node::const_iterator end() const;
376 void push_back (const
node &child);
390 node::iterator insert (const
node &n);
404 node::iterator insert(
node::iterator position, const
node &n);
422 node::iterator replace(
node::iterator old_node, const
node& new_node);
438 node::iterator erase(
node::iterator to_erase);
454 node::iterator erase(
node::iterator first,
node::iterator last);
468 void save_to_string(
std::
string& s,
error_handler& on_error = throw_on_error) const;
487 bool save_to_file(const
char *filename,
488 int compression_level = 0,
499 friend XMLWRAPP_API
std::ostream& operator<< (
std::ostream &stream, const
document &doc);
502 impl::doc_impl *pimpl_;
504 void set_doc_data (
void *data);
505 void set_doc_data_from_xslt (
void *data,
xslt::impl::result *xr);
506 void* get_doc_data();
507 void* get_doc_data_read_only() const;
508 void* release_doc_data();
513 friend class
xslt::stylesheet;
514 friend struct impl::xpath_context_impl;
519 #endif // _xmlwrapp_document_h_ The xml::tree_parser class is used to parse an XML document and generate a tree like structure of xml...
Definition: tree_parser.h:73
This file contains errors-handling classes: xml::exception and xml::error_handler and derived classes...
The xml::error_handler class is used to handle libxml2 errors and warnings emitted during parsing...
Definition: errors.h:84
This file contains the definition of the xml::init class.
This file contains the definition of the xml::node class.
XSLT library namespace.
Definition: document.h:55
error_handler_throw_on_error throw_on_error
Error handler object that throws on any error.
The xslt::stylesheet class is used to hold information about an XSLT stylesheet.
Definition: stylesheet.h:61
XML validator using RelaxNG.
Definition: relaxng.h:67
The xml::document class is used to hold the XML tree and various bits of information about it...
Definition: document.h:84
XML library namespace.
Definition: attributes.h:51
std::size_t size_type
size type
Definition: document.h:88
The xml::node class is used to hold information about one XML node.
Definition: node.h:88
XML Schema.
Definition: schema.h:66