Вот пример нашел тут:
AxPath://AOT/Forms/AifXsltRepository...importFromFile
X++:
// Open the file, get encoding.
textReader = XmlTextReader::newFile(filename);
textReader.read();
encoding = System.Text.Encoding::GetEncoding(textReader.encoding());
// Validate against schema.
textReader.moveToContent();
validationError = textReader.validate(this.getSchema());
textReader.close();