XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
How to remove elements from an XML instance document that is not partof the XML schema?

Hi Folks,

Scenario: The XML Schema says the root element is Document and it contains a sequence of an A element followed by a B element. Here's a schema-valid XML instance:

<Document>
    <A>blah</A>
    <B>bar</B>
</Document>

I receive this instance document:

<Document>
    <A>blah</A>
    <B>bar</B>
    <C>oops</C>
</Document>

For the instance to be schema-valid, the C element must be removed. 

Is there a tool that, given an XML Schema and an XML instance, the tool returns the instance minus any invalid elements? That is, the tool returns a schema-valid instance.

/Roger


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS