MarkupIdentifier

class omexmeta::MarkupIdentifier

determines whether input language is sbml, cellml or unknown

Public Functions

explicit MarkupIdentifier(std::string markup)

constructor for MarkupIdentifier

Parameters

markup – a string of your xml.

~MarkupIdentifier()
bool isSBML()

test to see whether the xml passed to constructor is SBML

Returns

true if xml passed to constructor is SBML

bool isCellML()

test to see whether the xml passed to constructor is CellML

Returns

true if xml passed to constructor is CellML

const std::vector<std::string> &getElementNames() const

Private Functions

xmlDoc *parseML()

read an xml document using libxml2.

void collectElementNames(xmlNode *a_node)

collect the name of the element pointed to by a_node

*a_node pointer to an xmlNode

Private Members

xmlDocPtr doc_
std::string markup_
std::vector<std::string> element_names_