27 #include <QTextStream>
35 const QFileInfo xsdFileInfo( resourcesDir, QStringLiteral(
"schemaExtension.xsd" ) );
36 QString schema_str = QStringLiteral(
"<?xml version='1.0'?>" );
38 if ( !xsdFileInfo.exists() )
41 QStringLiteral(
"Server" ), Qgis::MessageLevel::Critical );
45 QFile file( xsdFileInfo.absoluteFilePath() );
46 if ( file.open( QFile::ReadOnly | QFile::Text ) )
48 QTextStream in( &file );
49 schema_str = in.readAll();
55 QStringLiteral(
"Server" ), Qgis::MessageLevel::Critical );
58 response.
setHeader( QStringLiteral(
"Content-Type" ), QStringLiteral(
"text/xml; charset=utf-8" ) );
59 response.
write( schema_str );