libutap
Namespaces | Enumerations | Functions
xmlreader.cpp File Reference
#include <libxml/xmlreader.h>
#include <libxml/xpath.h>
#include <libxml/parser.h>
#include <libxml/xmlstring.h>
#include <stdexcept>
#include <cstdarg>
#include <cctype>
#include <cassert>
#include <algorithm>
#include <list>
#include <vector>
#include <map>
#include <sstream>
#include "libparser.h"
#include <string.h>
#include "utap/position.h"
#include "tags.cc"

Namespaces

 UTAP
 

Enumerations

enum  UTAP::tag_t {
  UTAP::TAG_NTA, UTAP::TAG_IMPORTS, UTAP::TAG_DECLARATION, UTAP::TAG_TEMPLATE,
  UTAP::TAG_INSTANTIATION, UTAP::TAG_SYSTEM, UTAP::TAG_NAME, UTAP::TAG_PARAMETER,
  UTAP::TAG_LOCATION, UTAP::TAG_INIT, UTAP::TAG_TRANSITION, UTAP::TAG_URGENT,
  UTAP::TAG_COMMITTED, UTAP::TAG_BRANCHPOINT, UTAP::TAG_SOURCE, UTAP::TAG_TARGET,
  UTAP::TAG_LABEL, UTAP::TAG_NAIL, UTAP::TAG_NONE, UTAP::TAG_PROJECT,
  UTAP::TAG_LSC, UTAP::TAG_TYPE, UTAP::TAG_MODE, UTAP::TAG_ROLE,
  UTAP::TAG_YLOCCOORD, UTAP::TAG_LSCLOCATION, UTAP::TAG_PRECHART, UTAP::TAG_INSTANCE,
  UTAP::TAG_TEMPERATURE, UTAP::TAG_MESSAGE, UTAP::TAG_CONDITION, UTAP::TAG_UPDATE,
  UTAP::TAG_ANCHOR, UTAP::TAG_SBML, UTAP::TAG_QUERIES, UTAP::TAG_QUERY,
  UTAP::TAG_FORMULA, UTAP::TAG_COMMENT
}
 Enumeration type for tags. More...
 

Functions

static bool UTAP::isempty (string str)
 Returns TRUE if string is zero length or contains only white spaces otherwise FALSE. More...
 
static bool UTAP::isAlpha (unsigned char c)
 
static bool UTAP::isIdChr (unsigned char c)
 
static string UTAP::symbol (const char *str)
 Extracts the alpha-numerical symbol used for variable/type identifiers. More...
 
int32_t parseXMLFile (const char *filename, ParserBuilder *pb, bool newxta)
 Parse the file with the given name assuming it is in the XML format, reporting the system to the given implementation of the the ParserBuilder interface and reporting errors to the ErrorHandler. More...
 
int32_t parseXMLBuffer (const char *buffer, ParserBuilder *pb, bool newxta)
 Parse a buffer in the XML format, reporting the system to the given implementation of the the ParserBuilder interface and reporting errors to the ErrorHandler. More...
 
string getXMLElement (xmlDocPtr docPtr, const string &path)
 Get the contents of the XML element with the specified path. More...
 
string getXMLElement (const char *xmlBuffer, const string &path)
 Get the contents of the XML element with the specified path. More...
 

Function Documentation

string getXMLElement ( xmlDocPtr  docPtr,
const string &  path 
)

Get the contents of the XML element with the specified path.

Parameters
xmlDocPtr- The XML document.
pos- The position path
Returns
res - The contents

Referenced by getXMLElement().

string getXMLElement ( const char *  xmlBuffer,
const string &  path 
)

Get the contents of the XML element with the specified path.

Parameters
xmlBuffer- The data in the xml buffer
pos- The position path
Returns
res - The contents

References getXMLElement().

int32_t parseXMLBuffer ( const char *  buffer,
UTAP::ParserBuilder ,
bool  newxta 
)

Parse a buffer in the XML format, reporting the system to the given implementation of the the ParserBuilder interface and reporting errors to the ErrorHandler.

If newxta is true, then the 4.x syntax is used; otherwise the 3.x syntax is used. On success, this function returns with a positive value.

int32_t parseXMLFile ( const char *  filename,
UTAP::ParserBuilder ,
bool  newxta 
)

Parse the file with the given name assuming it is in the XML format, reporting the system to the given implementation of the the ParserBuilder interface and reporting errors to the ErrorHandler.

If newxta is true, then the 4.x syntax is used; otherwise the 3.x syntax is used. On success, this function returns with a positive value.