FinishParsing() public method

public FinishParsing ( ) : SchemaType
return SchemaType
 private void ProcessInlineSchema()
 {
     if (!inlineSchemaParser.ParseReaderNode())   // Done
     {
         inlineSchemaParser.FinishParsing();
         XmlSchema schema   = inlineSchemaParser.XmlSchema;
         string    inlineNS = null;
         if (schema != null && schema.ErrorCount == 0)
         {
             try {
                 SchemaInfo inlineSchemaInfo = new SchemaInfo();
                 inlineSchemaInfo.SchemaType = SchemaType.XSD;
                 inlineNS = schema.TargetNamespace == null? string.Empty : schema.TargetNamespace;
                 if (!SchemaInfo.TargetNamespaces.ContainsKey(inlineNS))
                 {
                     if (SchemaCollection.Add(inlineNS, inlineSchemaInfo, schema, true) != null)   //If no errors on compile
                     //Add to validator's SchemaInfo
                     {
                         SchemaInfo.Add(inlineSchemaInfo, EventHandler);
                     }
                 }
             }
             catch (XmlSchemaException e) {
                 SendValidationEvent(Res.Sch_CannotLoadSchema, new string[] { BaseUri.AbsoluteUri, e.Message }, XmlSeverityType.Error);
             }
         }
         inlineSchemaParser = null;
     }
 }
Example #2
0
 private void ProcessInlineSchema()
 {
     if (!_inlineSchemaParser.ParseReaderNode())
     { // Done
         _inlineSchemaParser.FinishParsing();
         SchemaInfo xdrSchema = _inlineSchemaParser.XdrSchema;
         if (xdrSchema != null && xdrSchema.ErrorCount == 0)
         {
             foreach (string inlineNS in xdrSchema.TargetNamespaces.Keys)
             {
                 if (!this.schemaInfo.HasSchema(inlineNS))
                 {
                     schemaInfo.Add(xdrSchema, EventHandler);
                     SchemaCollection.Add(inlineNS, xdrSchema, null, false);
                     break;
                 }
             }
         }
         _inlineSchemaParser = null;
     }
 }