Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members

Dv::Xml Namespace Reference


Compounds

class  Document
 Convenience interface to xml::document. More...

class  Exception
 Exception class for Dv::Xml classes and functions. More...

struct  noconst
 Utility template: noconst<T>::mutable_type is T if T is not "const" and X if T is "const X". More...

struct  noconst< const T >
 Utility template: noconst<T>::mutable_type is T if T is not "const" and X if T is "const X". More...

struct  noconst< T * >
 Utility template: noconst<T>::mutable_type is T if T is not "const" and X if T is "const X". More...

class  Node
 Convenience interface to xml::node. More...

class  Node.AttributeReference
 Auxiliary class for attribute access. More...

class  Node.Ref
 A reference to an xml::node object. More...


Functions

void iconv (const char *to_charset, const char *from_charset, std::string &target, const char *source) throw (std::runtime_error)
 Convert source C-string between character sets.

void iconv (const char *to_charset, const char *from_charset, std::string &target, const std::string &source) throw (std::runtime_error)
 Convert source C-string between character sets.

std::string iconv (const char *to_charset, const char *from_charset, const char *source) throw (std::runtime_error)
 Convert source C-string between character sets.

std::string iconv (const char *to_charset, const char *from_charset, const std::string &source) throw (std::runtime_error)
 Convert source C-string between character sets.

std::string iso2utf8 (const std::string &source) throw (std::runtime_error)
 Convert "ISO-8859-1" string to "UTF8" string.

std::string iso2utf8 (const char *source) throw (std::runtime_error)
 Convert "ISO-8859-1" C-string to "UTF8" string.

std::ostream & operator<< (std::ostream &os, const Dv::Xml::Node::Ref &ref)
 Print an XML tree rooted at the node referred to by a Dv::Xml::Node::Ref object.

const char * to_html (unsigned char c) throw ()
 Convert to html representation.

std::string & to_html (const std::string &sin, std::string &sout) throw ()
 Convert string to html representation.

std::string to_html (const std::string &sin) throw ()
 Convert string to html representation.

Dv::Xml::Node date (const std::string &name, const Dv::Util::Date &d)
 Represent date as xml::node.


Function Documentation

void iconv const char *  to_charset,
const char *  from_charset,
std::string &  target,
const char *  source
throw (std::runtime_error)
 

Convert source C-string between character sets.

Parameters:
to_charset character set to convert to, e.g. "UTF8"
from_charset character set to convert from, e.g. "ISO-8859-1"
target string containing new version of source string.
source C-string
Exceptions:
std::runtime_error if anything goes wrong. Use iconv --list to see all supported character sets.

Referenced by iso2utf8().

void iconv const char *  to_charset,
const char *  from_charset,
std::string &  target,
const std::string &  source
throw (std::runtime_error)
 

Convert source C-string between character sets.

Parameters:
to_charset character set to convert to, e.g. "UTF8"
from_charset character set to convert from, e.g. "ISO-8859-1"
target string containing new version of source string.
source C-string
Exceptions:
std::runtime_error if anything goes wrong. Use iconv --list to see all supported character sets.

std::string iconv const char *  to_charset,
const char *  from_charset,
const char *  source
throw (std::runtime_error)
 

Convert source C-string between character sets.

Parameters:
to_charset character set to convert to, e.g. "UTF8"
from_charset character set to convert from, e.g. "ISO-8859-1"
source C-string
Returns:
string containing new version of source string (in target character set).
Exceptions:
std::runtime_error if anything goes wrong. Use iconv --list to see all supported character sets.

std::string iconv const char *  to_charset,
const char *  from_charset,
const std::string &  source
throw (std::runtime_error)
 

Convert source C-string between character sets.

Parameters:
to_charset character set to convert to, e.g. "UTF8"
from_charset character set to convert from, e.g. "ISO-8859-1"
source C-string
Returns:
string containing new version of source string (in target character set).
Exceptions:
std::runtime_error if anything goes wrong. Use iconv --list to see all supported character sets.

std::string iso2utf8 const std::string &  source  )  throw (std::runtime_error) [inline]
 

Convert "ISO-8859-1" string to "UTF8" string.

Parameters:
source string (using "ISO-8859-1" character set).
Returns:
string containing source string (in "UTF8" character set).
Exceptions:
std::runtime_error if anything goes wrong. Use iconv --list to see all supported character sets.

Definition at line 63 of file dviconv.h.

References iconv().

std::string iso2utf8 const char *  source  )  throw (std::runtime_error) [inline]
 

Convert "ISO-8859-1" C-string to "UTF8" string.

Parameters:
source string (using "ISO-8859-1" character set).
Returns:
string containing source string (in "UTF8" character set).
Exceptions:
std::runtime_error if anything goes wrong. Use iconv --list to see all supported character sets.

Definition at line 73 of file dviconv.h.

References iconv().

std::ostream& operator<< std::ostream &  os,
const Dv::Xml::Node::Ref ref
 

Print an XML tree rooted at the node referred to by a Dv::Xml::Node::Ref object.

Parameters:
os stream to print to
ref reference to xml::node (may be invalid)
Warning:
The function will print "nil" if the object does not refer to a valid xml::node.

const char* to_html unsigned char  c  )  throw ()
 

Convert to html representation.

E.g. '&' becomes '&' etc.

Parameters:
c char to convert
Returns:
HTML representation of c

std::string& to_html const std::string &  sin,
std::string &  sout
throw ()
 

Convert string to html representation.

E.g. '&' becomes '&' etc.

Parameters:
sin string to convert.
sout string to which result of conversion will be appended.
Returns:
reference to sout.

std::string to_html const std::string &  sin  )  throw ()
 

Convert string to html representation.

E.g. '&' becomes '&' etc.

Parameters:
sin string to convert.
Returns:
converted string

Dv::Xml::Node date const std::string &  name,
const Dv::Util::Date d
 

Represent date as xml::node.

Parameters:
name tag of main xml::node.
d date to represent.
Returns:
Dv::Xml::Node representing d.


dvxml-0.1.4 [19 September, 2003]