Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Biz Talk SDK > Obsolete class ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 589 of 642
Post > Topic >>

Obsolete class XmlSchemaCollection

by =?Utf-8?B?bXVzdGFuZw==?= <mustang@[EMAIL PROTECTED] > Sep 24, 2007 at 06:18 AM

I have created a custom receive pipeline component and I need to validate
the 
incoming message contents against the schema. Currently I use the pipeline

context property to obtain the schema. My code looks something like this:


private static System.Xml.Schema.XmlSchemaSet 
GetSchemaSet(Microsoft.BizTalk.Component.Interop.IPipelineContext 
pContext)
{
    System.Xml.Schema.XmlSchemaSet schemaSet;
    Microsoft.BizTalk.Component.Interop.IDo***entSpec docSpec;
    System.Xml.Schema.XmlSchemaCollection schemaCollection;

    try {
        docSpec = pContext.GetDo***entSpecByType(DOC_SPEC_TYPE);
        schemaCollection = docSpec.GetSchemaCollection();

        if (schemaCollection.Count > 0) {
            schemaSet = new System.Xml.Schema.XmlSchemaSet();
            foreach (System.Xml.Schema.XmlSchema schema in
schemaCollection) {
                schemaSet.Add(schema);
            }
        }
    }
    catch { /* If any errors occur, just return a null SchemaSet */ }

    return schemaSet;
}

According to Microsoft's do***entation, XmlSchemaCollection is an obsolete

class, yet this is the return type for IDo***entSpec.GetSchemaCollection.
Am 
I handling this the wrong way, or is there another way I could be loading
the 
schemas into a XmlSchemaSet collection?

Thanks in advance.

-mustang
 




 3 Posts in Topic:
Obsolete class XmlSchemaCollection
=?Utf-8?B?bXVzdGFuZw==?=   2007-09-24 06:18:00 
RE: Obsolete class XmlSchemaCollection
wjzhang@[EMAIL PROTECTED]  2007-09-25 11:04:02 
RE: Obsolete class XmlSchemaCollection
wjzhang@[EMAIL PROTECTED]  2007-09-27 13:59:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 4:52:13 CST 2008.