473,388 Members | 1,399 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

How to avoid an Element parsing in an XML File while validating theXML File with an XSD

Dear All,
I have an XML file and an XSD.
I am validating the XML file with the XSD for the correct structure.
Is there any way where we can neglect 1 or more XML elements to be
validated against the XSD.

Appreciate your Help.

Thanks & Regards
Madhu K
Sep 30 '08 #1
1 1713
km**********@gmail.com wrote:
I have an XML file and an XSD.
I am validating the XML file with the XSD for the correct structure.
Is there any way where we can neglect 1 or more XML elements to be
validated against the XSD.
If you can change the schema then you can make use of the xs:any element
and its attribute processContents which you can set to lax validation
(processor will validate only if a matching schema definition is found)
or to skip validation.
See http://www.w3.org/TR/xmlschema-0/#any for an introduction and
example on using xs:any.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Oct 1 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ulf Heyder | last post by:
Hello, I have to deal with some xml schemas from a third party. This schema contains the following complex type. <?xml version="1.0"?> <xsd:schema ... elementFormDefault="qualified"> .......
6
by: Wole Ogunremi | last post by:
I guess this is a well asked question but it is tripping me up! I'm putting a forum together allowing xhtml markup content. I am validating against a schema but getting "Could not find schema...
2
by: Cigdem | last post by:
Hello, I am trying to parse the XML files that the user selects(XML files are on anoher OS400 system called "wkdis3"). But i am permenantly getting that error: Directory0: \\wkdis3\ROOT\home...
1
by: Sergey Batishchev | last post by:
I need to create element with some content inside. This may be any HTML stuff - tags, text. I do next Set newelem = doc.createElement("span") newelem.innerHTML = "<a...
8
by: Developer | last post by:
Hello, Is there a way to validate an xml fragment? For example, I'd like to know whether this tag is legal, and if not, what's wrong: <complexType name="CIty Grid"> Thanks.
0
by: BC3Tech | last post by:
I'm creating a system that uses XML to store an audit trail of the steps that it has been through in the system. The way the schema is defined, there is a "Tag" for every application that...
10
by: sp | last post by:
I create an xml file in a text editor: <?xml version="1.0" encoding="utf-8"?> <elts> <elt id="1" class="c1">content1</elt> <elt id="2" class="c1">content2</elt> </elts> Then I load the file...
0
by: june | last post by:
Hi, I have a big problem with parsing HTML into a XHTML using Cberneko to validate the html. First I tried to work with a HTML-File. This solutions works fine: String aHTMLFile =...
2
by: anii | last post by:
Hi there, I'm new to writing XML (just a couple of weeks old) so please bear with me. I was wondering when it would be the right time to use PCDATA in the DTD. I think there are another two data...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.