- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Mers::Utils::Io::Xml::Sax::XMLLoader Class Reference

`#include <XMLLoader.h>`

List of all members.

## Static Public Member Functions
static void | initialize ()
static int | loadContent (XERCES_CPP_NAMESPACE::SAX2XMLReader *reader, const Mers::Utils::Lang::String &fileName, ContentHandler *cHandler)
template<typename ObjectType, typename ObjectDataType, class ObjectContentHandler>
static int | load (const Mers::Utils::Lang::String &fileName, ObjectType &out_obj, ObjectDataType data)

## Detailed Description

This class can load an XML file using a Content Handler.

Definition at line 32 of file XMLLoader.h.

## Member Function Documentation

void XMLLoader::initialize | ( |  | ) | `[static]`

This function must be called before using this XMLLoader functions. This function intializes the XML system so it knows the language, character set, and os.

Definition at line 37 of file XMLLoader.cpp.

static int Mers::Utils::Io::Xml::Sax::XMLLoader::loadContent | ( | XERCES_CPP_NAMESPACE::SAX2XMLReader * | reader,
|  | const Mers::Utils::Lang::String & | fileName,
|  | ContentHandler * | cHandler |
| ) |  |  | `[static]`

Loads content from the file with the specified name using the specified content handler.

Parameters:

  | reader | The reader to use for loading content. This reader should have already been created. The reader is deleted after loading the content.
  | fileName | The name of the file that contains the xml content that we wish to load.
  | cHandler | The content handler to use when loading the file. This content handler will be deleted after the file is loaded.

Returns:
  0 on success or a positive value if there was a problem loading the file with the specified content handler.

Referenced by load().

template<typename ObjectType, typename ObjectDataType, class ObjectContentHandler>

static int Mers::Utils::Io::Xml::Sax::XMLLoader::load | ( | const Mers::Utils::Lang::String & | fileName,
|  | ObjectType & | out_obj,
|  | ObjectDataType | data |
| ) |  |  | `[inline, static]`

Loads an XML Document with the specified content handler and data.

Parameters:

  | fileName | The name of the file that contains the xml content that we wish to load.
  | out_obj | The object loaded from the file is stored here.
  | data | The extra data required to load the object obj. This data is given to the content handler.

Returns:
  0 on success or a positive value if there was a problem loading the file.

Definition at line 79 of file XMLLoader.h.

References loadContent().

Here is the call graph for this function:

The documentation for this class was generated from the following files:

- /Users/fpy/titan-1-5-MBARI/Mers/Utils/Io/Xml/Sax/XMLLoader.h
- /Users/fpy/titan-1-5-MBARI/Mers/Utils/Io/Xml/Sax/XMLLoader.cpp