Validate xml instance against schema

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JoeZ

    #1

    Validate xml instance against schema

    Hi all,

    I am using XMLValidatingRe ader to validate xml instance against schema.

    Now my question is: in the schema, it has the target name space.
    In the instance, it doesn't have the name space.
    I can not add the name space into the instance, if I could do that I won't
    have any problem.

    Currently I use XmlTextReader, XmlValidatingRe ader or XmlDocument.
    I am looking for the help to make it work without adding the name space into
    the instance.
    Is it doable?

    TIA,

    JoeZ


  • John Saunders

    #2
    Re: Validate xml instance against schema

    "JoeZ" <joez@microsoft .comwrote in message
    news:ObOrZXcYHH A.1296@TK2MSFTN GP02.phx.gbl...
    Hi all,
    >
    I am using XMLValidatingRe ader to validate xml instance against schema.
    >
    Now my question is: in the schema, it has the target name space.
    In the instance, it doesn't have the name space.
    I can not add the name space into the instance, if I could do that I won't
    have any problem.
    >
    Currently I use XmlTextReader, XmlValidatingRe ader or XmlDocument.
    I am looking for the help to make it work without adding the name space
    into the instance.
    Is it doable?
    No.

    Either the schema has to change or the instance has to change. If the
    instance documents are not going to have a namespace, then the schema needs
    to not have a namespace. A schema specifying a namespace is totally
    unrelated to one that does not.

    John


    Comment

    Working...