Пример #1
0
void XmlValidatorJob::validate()
{
    if(!m_schemaUrl.isEmpty() && !m_documentUrl.isEmpty())
        m_result = validateSchema(m_documentUrl, m_schemaUrl);
    else if(!m_documentUrl.isEmpty())
        m_result = validateDTD(m_documentUrl, m_dtdUrl);
    setError(m_result);
    emitResult();
}
	void XMLCheckpointParser::loadCheckpoint(const string &fileName, Checkpoint* checkpoint)
	{
		if(validateSchema("textures/objects/checkpoints.xsd", fileName.c_str()) == 0)
			parseCheckpoint(fileName, checkpoint);
	}
void XMLBackgroundParser::loadBackground(const std::string &fileName, Background* background)
{
    if(validateSchema("textures/backgrounds/backgrounds.xsd", fileName.c_str()) == 0)
        parseItem(fileName, background);
}