473,491 Members | 2,074 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

XML Validation Problem

I am trying to validate some xml via msxml (works OK via xmlspy).

XML := CreateOLEObject('MSXML2.DOMDocument.4.0');
Xml.validateOnParse := true;
XML.resolveExternals := true;
XSDL := CreateOLEObject('MSXML2.XMLSchemaCache.4.0');
xsdl.validateOnLoad := true;
XSDL.add(NSEdit.Text,'aaa.xsd');
XSDL.add(NSEdit.Text,'bbb.xsd');
XSDL.add(NSEdit.Text,'ccc.xsd'
XML.async := false;
XML.load('aaa.xML');

bbb.xsd references a simple type in ccc.xsd, but msxml doesn't find
it, as I said xmlspy does.
Also mslxml doesn't seem to pick up the maxlength attribute.

Can any one give me some pointers to what I am doing wrong, or tell be
of a 3rd party product I can use from within code, which works!.
Jul 20 '05 #1
3 2295


June Brown wrote:
I am trying to validate some xml via msxml (works OK via xmlspy).

XML := CreateOLEObject('MSXML2.DOMDocument.4.0');
Xml.validateOnParse := true;
XML.resolveExternals := true;
XSDL := CreateOLEObject('MSXML2.XMLSchemaCache.4.0');
xsdl.validateOnLoad := true;
XSDL.add(NSEdit.Text,'aaa.xsd');
XSDL.add(NSEdit.Text,'bbb.xsd');
XSDL.add(NSEdit.Text,'ccc.xsd'


Are all those schema files for the same namespace? Otherwise you would
need to pass a different namespace as the first argument to add.


--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

All the xsd have the same target namespace, so in reality

I could just do

xml.load('aaa.xsd')

but this fails too.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #3


June Brown wrote:
All the xsd have the same target namespace, so in reality

I could just do

xml.load('aaa.xsd')

but this fails too.


It is hard to tell what goes wrong, if you can't solve it yourself then
consider putting up the XML instance file and the XML schema files on a
public HTTP server and posting the URLs in a newsgroup. As you are using
MSXML and want help on that I think the group microsoft.public.xml is a
better place to ask as more MSXML users read and post there than in this
general XML group. Also try to reduce the files as far as possible to
demonstrate the problem.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #4

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

Similar topics

21
3877
by: Stefan Richter | last post by:
Hi, after coding for days on stupid form validations - Like: strings (min / max length), numbers(min / max value), money(min / max value), postcodes(min / max value), telefon numbers, email...
41
2577
by: Gérard Talbot | last post by:
Cross-posted to: comp.infosystems.www.authoring.html and alt.html Followup-to: comp.infosystems.www.authoring.html 1- One day, I stumbled across a website that offers to validate webpages. What...
3
2224
by: Kent Ogletree | last post by:
I am porting a Java XML Validation class over to C# and I am having a problem finding exactly what I need to acomplish the task. First I need to test for well formedness. I know this is usually...
4
2346
by: | last post by:
Hello Guys, I am using the validation controls to validate my data. But the problem is "The page is still being posted to server". I want to get rid of the round trips to server. Are there...
4
10122
by: usl2222 | last post by:
Hi folks, I appreciate any assistance in the following problem: I have a form with a bunch of dynamic controls on it. All the controls are dynamically generated on a server, including all...
3
2818
by: john morales | last post by:
Hi guys, I have a problem and i know there must be a solution for this as it is such a basic common practice in asp.net development. Scenario: i have many webforms in a site, most with two...
5
3219
by: Chris | last post by:
Based upon some prevoius postings on what to do for adding a 'add' row to a datagrid I utilize the footer to create the 'add' row. The only issue is that I have it sharing the 'UpDate_Command' and...
4
2959
by: David Colliver | last post by:
Hi all, I am having a slight problem that hopefully, someone can help me fix. I have a form on a page. Many items on the form have validation controls attached. Also on this form are...
9
3160
by: Bill Long | last post by:
I have a control that simply displays a list of links. Following one of the links doesn't post back or redirect to another page, it simply hides the current panel and shows the one you selected......
2
4492
by: dustbort | last post by:
I recently had a problem where my required field validator stopped working. But, the page still posted back and tried to insert a record into the database without performing server-side validation....
0
7115
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
7154
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
7190
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...
1
6858
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
7360
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
5451
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,...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
280
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.