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

Validating a XML document with a XSD

I found code for validating XML documents with the XML Schema cashed for
rapid access.

Example 3: Validating with XMLSchemaCache.

http://msdn.microsoft.com/library/en...idate_5zzn.asp

This code seems not to be working no matter I do to fix it. I receive the
following errors.

Private Sub Form_Load() - Statement is not valid in a namespace
Function ValidateFile(ByVal strXmlFile As String, ByVal strUrn As String,
_ByVal strXsdFile As String - Statement is not in a valid Namespace.

Sub Main was not found in 'XML_Valid_Test1.form1 - This project does not
have a valid Sub Main () You must add Sharded Sub Main()
End Sub to one of the Class declarations.

Help!

-={Biran Kedersha}=-
Nov 12 '05 #1
1 2247
The example you posted is for MSXML 4.0 and Visual Basic 6. If you're
looking to validate XML with VB.NET (which the error messages you posted
indicate) then get started at [0]. It sounds like you should really get
started with an introduction to VB.NET first.

--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor

[0]
http://msdn.microsoft.com/library/en...ithschemas.asp

"Brian Kedersha" <bk*******@aol.com> wrote in message
news:eK**************@TK2MSFTNGP09.phx.gbl...
I found code for validating XML documents with the XML Schema cashed for
rapid access.

Example 3: Validating with XMLSchemaCache.

http://msdn.microsoft.com/library/en...idate_5zzn.asp
This code seems not to be working no matter I do to fix it. I receive the
following errors.

Private Sub Form_Load() - Statement is not valid in a namespace
Function ValidateFile(ByVal strXmlFile As String, ByVal strUrn As String,
_ByVal strXsdFile As String - Statement is not in a valid Namespace.

Sub Main was not found in 'XML_Valid_Test1.form1 - This project does not
have a valid Sub Main () You must add Sharded Sub Main()
End Sub to one of the Class declarations.

Help!

-={Biran Kedersha}=-

Nov 12 '05 #2

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

Similar topics

1
by: scorpion | last post by:
I have this problem that an xml instance is validated correctly by xml tools, but not with my simple code, by setting the validating flag to true. --------------- Schema...
2
by: Will | last post by:
I have been having problems validating an XForms document against the XForms schema located at http://www.w3.org/MarkUp/Forms/2002/XForms-Schema.xsd. I have reduced the XForm to its bare bones...
6
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
2
by: and | last post by:
Hi I have been validating all day most things are cool but I cant get by this problem. One I have listed the script (JAVASCRIPT ) in all the right placesnot a prob but the validator insists...
0
by: jean-gert nesselbosch | last post by:
hello everybody, does anybody know of standardization efforts concerning the output of w3cSchema/relaxNG-validating parsers ? I use libxml2 for validation-purposes (w3c-Schema and relaxNG) and...
6
by: Robert Reineri | last post by:
Hello, New to the XML world and .NET. I have what I believe to be a simple problem, but I have read the .NET docs till I'm blue in the face and still can't locate a simple example of how to...
1
by: Craig Beuker | last post by:
Hello, I am experimenting with this XmlValidatingReader and have a question about how it is working (or not working as would be the case) The sample documents and code are included at the end...
1
by: Chris Lieb | last post by:
I have an XML Schema file that I know is correct becuase I currently use it in a VB6 program to validate XML documents. Also, if I load an XML file into VS2005 that is not valid against this...
16
by: shyamg | last post by:
Hi, this is my javascript validating the fields in mozilla FF but its working and validating only one field. how to write the and how to works the script .................. function...
1
mickey0
by: mickey0 | last post by:
hello, validating this file on w3c I have many error: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.