Example #1
0
        public override void FixtureInit()
        {
            XmlSchemaCompletionCollection schemas = new XmlSchemaCompletionCollection();

            schemas.Add(SchemaCompletion);
            XmlSchemaCompletion xsdSchemaCompletionData = new XmlSchemaCompletion(ResourceManager.ReadXsdSchema());

            schemas.Add(xsdSchemaCompletionData);

            string xml = GetSchema();
            XmlSchemaDefinition schemaDefinition = new XmlSchemaDefinition(schemas, SchemaCompletion);

            schemaAttribute = (XmlSchemaAttribute)schemaDefinition.GetSelectedSchemaObject(xml, xml.IndexOf("ref=\"name"));

            int index = xml.IndexOf("ref=\"name");

            index = xml.IndexOf('n', index);
            referencedSchemaElement = (XmlSchemaElement)schemaDefinition.GetSelectedSchemaObject(xml, index);
        }
Example #2
0
        public override void FixtureInit()
        {
            XmlSchemaCompletionCollection schemas = new XmlSchemaCompletionCollection();

            schemas.Add(SchemaCompletion);
            string xml = "<note xmlns='http://www.w3schools.com' name=''></note>";
            XmlSchemaDefinition schemaDefinition = new XmlSchemaDefinition(schemas, null);

            schemaAttribute = (XmlSchemaAttribute)schemaDefinition.GetSelectedSchemaObject(xml, xml.IndexOf("name"));
        }
        public override void FixtureInit()
        {
            XmlSchemaCompletionCollection schemas = new XmlSchemaCompletionCollection();

            schemas.Add(SchemaCompletion);

            string xml   = "<note xmlns='http://www.w3schools.com'></note>";
            int    index = xml.IndexOf("note xmlns");

            XmlSchemaDefinition schemaDefinition = new XmlSchemaDefinition(schemas, null);

            schemaElement = (XmlSchemaElement)schemaDefinition.GetSelectedSchemaObject(xml, index);
            location      = schemaDefinition.GetSelectedSchemaObjectLocation(xml, index);
        }
        public override void FixtureInit()
        {
            XmlSchemaCompletionCollection schemas = new XmlSchemaCompletionCollection();

            schemas.Add(SchemaCompletion);
            XmlSchemaCompletion xsdSchemaCompletionData = new XmlSchemaCompletion(ResourceManager.ReadXsdSchema());

            schemas.Add(xsdSchemaCompletionData);

            string xml   = GetSchema();
            int    index = xml.IndexOf("type=\"dir\"/>");

            index = xml.IndexOf("dir", index);
            XmlSchemaDefinition schemaDefinition = new XmlSchemaDefinition(schemas, SchemaCompletion);

            schemaSimpleType = (XmlSchemaSimpleType)schemaDefinition.GetSelectedSchemaObject(xml, index);
        }
        public override void FixtureInit()
        {
            XmlSchemaCompletionCollection schemas = new XmlSchemaCompletionCollection();

            schemas.Add(SchemaCompletion);
            XmlSchemaCompletion xsdSchemaCompletionData = new XmlSchemaCompletion(ResourceManager.ReadXsdSchema());

            schemas.Add(xsdSchemaCompletionData);

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

            index = xml.IndexOf("coreattrs", index);
            XmlSchemaDefinition schemaDefinition = new XmlSchemaDefinition(schemas, SchemaCompletion);

            schemaAttributeGroup = (XmlSchemaAttributeGroup)schemaDefinition.GetSelectedSchemaObject(xml, index);
        }