/* * XML should look something like this: * * <fault-state family="AlarmSource" member="ALARM_SOURCE_ANTENNA" code="1"> * <descriptor>TERMINATE</descriptor> * <user-properties> * <property name="ASI_PREFIX" value="prefix"/> * <property name="ASI_SUFFIX" value="suffix"/> * <property name="TEST_PROPERTY" value="TEST_VALUE"/> * </user-properties> * <user-timestamp seconds="1129902763" microseconds="105000"/> * </fault-state> */ void AcsAlarmTestCase::verifyFaultStateXML(std::string xmlData) { try { DOMDocument* doc = parseDOM(xmlData); verifyFaultStateElement(doc, true); } catch (const XMLException& toCatch) { ACS_LOG(LM_ERROR, "verifyFaultStateXML", (LM_ERROR, "***** XMLException message: ***** \n\n%s \n *****\n", acsalarm::StrX(toCatch.getMessage()).localForm())) } }
/* * XML should look something like this: * * <user-properties> * <property name="ASI_PREFIX" value="prefix"/> * <property name="TEST_PROPERTY" value="TEST_VALUE"/> * <property name="ASI_SUFFIX" value="suffix"/> * </user-properties> */ void AcsAlarmTestCase::verifyPropertiesXML(std::string xmlToVerify) { try { DOMDocument* doc = parseDOM(xmlToVerify); verifyUserPropertiesElement(doc); } catch (const XMLException& toCatch) { ACS_LOG(LM_ERROR, "verifyPropertiesXML", (LM_ERROR, "***** XMLException message: ***** \n\n%s \n *****\n", acsalarm::StrX(toCatch.getMessage()).localForm())) } }
int PluginXMLParser::parseFile(const QString& filename) { QFile qf(filename); if (!qf.open(IO_ReadOnly)) { return -1; } QDomDocument doc(filename); if (!doc.setContent(&qf)) { qf.close(); return -2; } qf.close(); _pluginData.clear(); return parseDOM(doc); }
/** * Private method to orchestrate the XML parsing. */ int ParameterSet::parseInputString(const char* xmlFile) { return parseDOM(xmlFile); }