libxml++ 5.6.0

Classes | Typedefs | Enumerations | Functions
xmlpp Namespace Reference

## Classes
class | Attribute
| Represents an XML attribute node or attribute declaration. More...
class | AttributeDeclaration
| Represents the default value of an attribute of an XML element node. More...
class | AttributeNode
| Represents an explicit attribute of an XML element node. More...
class | CdataNode
| CData node. More...
class | CommentNode
| Comment node. More...
class | ContentNode
| Content node. More...
class | Document
| Represents an XML document in the DOM model. More...
class | DomParser
| DOM XML parser. More...
class | Dtd
| Represents an XML DTD for validating XML files. More...
class | DtdValidator
| XML DTD validator. More...
class | Element
| Element nodes have attributes as well as child nodes. More...
class | EntityDeclaration
| Entity declaration. More...
class | EntityReference
| Entity references refer to previously declared entities. More...
class | exception
| Base class for all xmlpp exceptions. More...
class | internal_error
class | IStreamParserInputBuffer
class | KeepBlanks
| This class sets KeepBlanksDefault and IndentTreeOutput of libxmlpp and restores their initial values in its destructor. More...
class | Node
| Represents XML Nodes. More...
class | NonCopyable
| A base for classes which cannot be copied or moved. More...
class | OStreamOutputBuffer
| An OutputBuffer implementation that send datas to a std::ostream. More...
class | OutputBuffer
| Base class for xmlOutputBuffer wrapper. More...
class | parse_error
| This exception will be thrown when the parser encounters an error in the XML document. More...
class | Parser
| XML parser. More...
class | ParserInputBuffer
| Base class for xmlParserInputBuffer wrapper. More...
class | ProcessingInstructionNode
class | RelaxNGSchema
| Represents a RelaxNG schema for validating XML files. More...
class | RelaxNGValidator
| RelaxNG schema validator. More...
class | SaxParser
| SAX XML parser. More...
class | SchemaBase
| Base class for schemas, used for validation of XML files. More...
class | SchemaValidatorBase
| Base class for schema validators. More...
class | TextNode
| Text node. More...
class | TextReader
| A TextReader-style XML parser. More...
class | Validator
| Base class for XML validators. More...
class | validity_error
| This exception will be thrown when the parser encounters a validity error in the XML document. More...
class | XIncludeEnd
| XIncludeEnd node. More...
class | XIncludeStart
| XIncludeStart node. More...
class | XsdSchema
| Represents an XSD schema for validating XML files. More...
class | XsdValidator
| XSD schema validator. More...

## Typedefs
using | ParserCallbackCFuncType = void (*)(void* ctx, const char* msg, ...)
| Type of function pointer to callback function with C linkage.
using | ustring = std::string
| This is just an indication to the programmer that the string contains UTF-8.
using | ValidatorCallbackCFuncType = void (*)(void* ctx, const char* msg, ...)
| Type of function pointer to callback function with C linkage.

## Enumerations
enum class | XmlEntityType { INTERNAL_GENERAL = 1 , EXTERNAL_GENERAL_PARSED = 2 , EXTERNAL_GENERAL_UNPARSED = 3 , INTERNAL_PARAMETER = 4 , EXTERNAL_PARAMETER = 5 , INTERNAL_PREDEFINED = 6 }
| The valid entity types. More...
enum class | XPathResultType { UNDEFINED = 0 , NODESET = 1 , BOOLEAN = 2 , NUMBER = 3 , STRING = 4 }
| An XPath expression is evaluated to yield a result, which has one of the following four basic types: More...

## Functions
ustring | format_printf_message (const char * fmt, va_list args)
| Format a message from a function with C-style variadic parameters.
ustring | format_xml_error (const _xmlError * error=nullptr)
| Format an _xmlError struct into a text string, suitable for printing.
ustring | format_xml_parser_error (const _xmlParserCtxt * parser_context)
| Format a parser error into a text string, suitable for printing.
std::istream & | operator>> (std::istream & in, Parser & parser)
| Equivalent to Parser::parse_stream().

## Typedef Documentation

## ◆ ParserCallbackCFuncType

using xmlpp::ParserCallbackCFuncType = void (*)(void* ctx, const char* msg, ...)

Type of function pointer to callback function with C linkage.

Since libxml++ 5.2

## ◆ ustring

using xmlpp::ustring = std::string

This is just an indication to the programmer that the string contains UTF-8.

On the other hand, when std::string appears in the libxml++ API, the encoding of the string may be UTF-8 or may be some other encoding.

## ◆ ValidatorCallbackCFuncType

using xmlpp::ValidatorCallbackCFuncType = void (*)(void* ctx, const char* msg, ...)

Type of function pointer to callback function with C linkage.

Since libxml++ 5.2

## Enumeration Type Documentation

## ◆ XmlEntityType

enum class xmlpp::XmlEntityType
| strong

The valid entity types.

Enumerator
INTERNAL_GENERAL |
EXTERNAL_GENERAL_PARSED |
EXTERNAL_GENERAL_UNPARSED |
INTERNAL_PARAMETER |
EXTERNAL_PARAMETER |
INTERNAL_PREDEFINED |

## ◆ XPathResultType

enum class xmlpp::XPathResultType
| strong

An XPath expression is evaluated to yield a result, which has one of the following four basic types:

- node-set
- boolean
- number
- string

Enumerator
UNDEFINED |
NODESET |
BOOLEAN |
NUMBER |
STRING |

## Function Documentation

## ◆ format_printf_message()

ustring xmlpp::format_printf_message | ( | const char * | fmt,
|  | va_list | args )

Format a message from a function with C-style variadic parameters.

Helper function that formats a message supplied in the form of a printf-style format specification and zero or more ... parameters.

// Typical call:
void f(const char* fmt, ...)
{
va_list args;
va_start(args, fmt);
ustring msg = xmlpp::format_printf_message(fmt, args);
va_end(args);
// ...
}
xmlpp::format_printf_message
ustring format_printf_message(const char *fmt, va_list args)
Format a message from a function with C-style variadic parameters.
xmlpp::ustring
std::string ustring
This is just an indication to the programmer that the string contains UTF-8.
Definition ustring.h:31

Since libxml++ 3.0

## ◆ format_xml_error()

ustring xmlpp::format_xml_error | ( | const _xmlError * | error = nullptr | ) |

Format an _xmlError struct into a text string, suitable for printing.

Since libxml++ 2.36

Parameters

  error | Pointer to an _xmlError struct or nullptr. If nullptr, the error returned by xmlGetLastError() is used.

Returns
  A formatted text string. If the error struct does not contain an error (error->code == XML_ERR_OK), an empty string is returned.

## ◆ format_xml_parser_error()

ustring xmlpp::format_xml_parser_error | ( | const _xmlParserCtxt * | parser_context | ) |

Format a parser error into a text string, suitable for printing.

Since libxml++ 2.36

Parameters

  parser_context | Pointer to an _xmlParserCtxt struct.

Returns
  A formatted text string. If the parser context does not contain an error (parser_context->lastError.code == XML_ERR_OK), an empty string is returned.

## ◆ operator>>()

std::istream & xmlpp::operator>> | ( | std::istream & | in,
|  | Parser & | parser )
| inline

Equivalent to Parser::parse_stream().

Since libxml++ 2.38