Problem with ValidationEventHandler

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

    #1

    Problem with ValidationEventHandler

    Hi
    I've got a xml file and xsd with only one namespace -
    xmlns:media="ht tp://search.yahoo.co m/mrss". When I'm getting the rss
    feed for example from Youtube there're also others namespaces such as
    xmlns:atom or xmlns:yt. When I'm trying to validate this Xml with my
    xsd the validationevent handler show me only the first error. But what
    when we got xml file like:

    <channel>
    <atom:idIdent </atom:id>
    <atom:nameNam e </atom:name>
    .....
    </channel>

    The Validator show me the atom:id is not in my xsd file but there's
    nothing about next wrong items such as atom:name.
    What should I do to change this to show me all the errors??

    Thanks
    kplazinski
  • Pavel Minaev

    #2
    Re: Problem with ValidationEvent Handler

    On Sep 29, 6:55 pm, Konrad <kplazin...@gma il.comwrote:
    Hi
    I've got a xml file and xsd with only one namespace -
    xmlns:media="ht tp://search.yahoo.co m/mrss". When I'm getting the rss
    feed for example from Youtube there're also others namespaces such as
    xmlns:atom or xmlns:yt. When I'm trying to validate this Xml with my
    xsd the validationevent handler show me only the first error. But what
    when we got xml file like:
    >
    <channel>
    <atom:idIdent </atom:id>
    <atom:nameNam e </atom:name>
    ....
    </channel>
    >
    The Validator show me the atom:id is not in my xsd file but there's
    nothing about next wrong items such as atom:name.
    What should I do to change this to show me all the errors??
    You should have a look at XmlSchemaValida tor class. It allows you to
    validate XML node by node, and to skip over nodes when you want (e.g.
    when the node itself didn't validate).

    Comment

    Working...