473,394 Members | 1,902 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,394 software developers and data experts.

Validating XML document without using "xsi:schemaLocation" attribute

Hi

I'm using SAX Parser of Xerces Java v2.4.0 for XML Parsing.
I want to perform schema validations on the xml.

The problem is that root element of XML document does not have
"xsi:schemaLocation" attribute, which is used to specify the .xsd
file.

Is there any other way for specifying the name of .xsd file?

thanks,
Naresh
Jul 20 '05 #1
1 2404
Hello,
Hi

I'm using SAX Parser of Xerces Java v2.4.0 for XML Parsing.
I want to perform schema validations on the xml.

The problem is that root element of XML document does not have
"xsi:schemaLocation" attribute, which is used to specify the .xsd
file.

Is there any other way for specifying the name of .xsd file?


Take a look at
http://java.sun.com/webservices/docs...9.html#wp65302

There is a paragraph "You can also specify the schema file in the
application, using code like this:"

I hope this helps.

Bye
C. Ludwig

Jul 20 '05 #2

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

Similar topics

1
by: Naresh Agarwal | last post by:
Hi I'm using SAX Parser of Xerces Java v2.4.0 for XML Parsing. I want to perform schema validations on the xml. The problem is that root element of XML document does not have...
1
by: John | last post by:
I have an input document that contains a large base64 encoded document. This document also declares a schema location in the root element. I want to write an XSL stylesheet that makes an exact...
0
by: Sarah Tegtmeier | last post by:
Hi I have a question about the correct use of the attribute xsi:schemaLocation. My programm has to process XML files where the value of this attribute causes some problems. The programm is...
0
by: Ron James | last post by:
I'm developing a GUI application in C#. I have a schema file (.XSD) and am able to serialize and deserialize the applications data using the schema file to an .XML file. (I'm using xsd.exe to...
2
by: kaush | last post by:
Hi all, I am trying to serialize a C# object into a XML document using "XmlSerializer" class. One of the elements of the XML document needs a "xsi:schemaLocation" attribute. I am not sure how to...
0
by: kolja2003 | last post by:
Hi, I need to program the creation of the XML file of given structure. I try to do it through the serialization of class object. hence I need to write the class definition which will be serialized...
2
by: grochmal | last post by:
I am trying to use XmlSerializer to serialize a class I have created specifically for generating an XML file. The problem is that the XML file must contain a xsi:schemaLocation attribute in my...
0
by: spiceworm | last post by:
Hi all, I'm getting really confused how to solve this. I've got this class generated from XSD with xsd (from visual studio 2005) namespace gpx { using System.Xml.Serialization;
1
by: Parsed Cheese | last post by:
After two days I am at wits end, but I am too OCD'ed to give up. Please tell me what I have got wrong because no Validation Error is being thrown. The element: "<datestamp>I should...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.