public OdfMetadata BuildOdfMetadata( string metaXml, IXmlNamespaceResolver manager,
		                                     IXDocumentParserService parserService )
        {
            var document = parserService.Parse( metaXml );
            var modelTypeNameElement =
                document.XPathSelectElement( @"//meta:user-defined[ @meta:name = 'ModelType' ]", manager );

            var modelTypeName = modelTypeNameElement.Value;

            var type = Type.GetType( modelTypeName, true );
            return new OdfMetadata( type );
        }
        public OdfMetadata BuildOdfMetadata(string metaXml, IXmlNamespaceResolver manager,
                                            IXDocumentParserService parserService)
        {
            var document             = parserService.Parse(metaXml);
            var modelTypeNameElement =
                document.XPathSelectElement(@"//meta:user-defined[ @meta:name = 'ModelType' ]", manager);

            var modelTypeName = modelTypeNameElement.Value;

            var type = Type.GetType(modelTypeName, true);

            return(new OdfMetadata(type));
        }
示例#3
0
        private void ConvertDocument(string originalContent)
        {
            var content = EncodeAtSigns(originalContent);

            DocumentContent = _xDocumentParserService.Parse(content);
        }