コード例 #1
0
        public override void FixtureInit()
        {
            XmlSchemaCompletionDataCollection schemas = new XmlSchemaCompletionDataCollection();

            schemas.Add(SchemaCompletionData);
            XmlCompletionDataProvider provider = new XmlCompletionDataProvider(schemas, SchemaCompletionData, String.Empty);
            string xml = "<note xmlns='http://www.w3schools.com'></note>";

            schemaElement = (XmlSchemaElement)XmlView.GetSchemaObjectSelected(xml, xml.IndexOf("note xmlns"), provider);
        }
コード例 #2
0
        public override void FixtureInit()
        {
            XmlSchemaCompletionDataCollection schemas = new XmlSchemaCompletionDataCollection();

            schemas.Add(SchemaCompletionData);
            XmlSchemaCompletionData xsdSchemaCompletionData = new XmlSchemaCompletionData(ResourceManager.GetXsdSchema());

            schemas.Add(xsdSchemaCompletionData);
            XmlCompletionDataProvider provider = new XmlCompletionDataProvider(schemas, xsdSchemaCompletionData, String.Empty);

            string xml   = GetSchema();
            int    index = xml.IndexOf("ref=\"dir\"");

            index           = xml.IndexOf("dir", index);
            schemaAttribute = (XmlSchemaAttribute)XmlView.GetSchemaObjectSelected(xml, index, provider, SchemaCompletionData);
        }