Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-20-2002, 08:16 PM   PM User | #1
butterfly
New to the CF scene

 
Join Date: Dec 2002
Location: Maryland
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
butterfly is an unknown quantity at this point
Validating XML

Hi everyone,

I would like to validate a XML file by using SAX API. I don't know which API is the right one. Also, how and where do I have to filesave the SAX API. Forte for Java 1.4 is available on my computer.

Thank you!
butterfly is offline   Reply With Quote
Old 12-20-2002, 08:24 PM   PM User | #2
jkd
Senior Coder

 
jkd's Avatar
 
Join Date: May 2002
Location: metro DC
Posts: 3,163
Thanks: 1
Thanked 18 Times in 18 Posts
jkd will become famous soon enough
Wouldn't it be easier to write a Schema or DTD to validate the XML file?
__________________
jasonkarldavis.com
jkd is offline   Reply With Quote
Old 12-20-2002, 08:32 PM   PM User | #3
butterfly
New to the CF scene

 
Join Date: Dec 2002
Location: Maryland
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
butterfly is an unknown quantity at this point
Quote:
Originally posted by jkd
Wouldn't it be easier to write a Schema or DTD to validate the XML file?
Thank you.
But I am writting a program with user interface in Java. I want that the user opens one xml file at first and then click on a button to check the validation of this xml file.
butterfly is offline   Reply With Quote
Old 12-27-2002, 05:21 PM   PM User | #4
brothercake
Senior Coder


 
Join Date: Jun 2002
Location: near Oswestry
Posts: 4,508
Thanks: 0
Thanked 0 Times in 0 Posts
brothercake is an unknown quantity at this point
PHP SAX has no validation; it doesn't even check well-formedness. I assume that Java SAX is the same, but I don't know for a fact.

If you need XML validation then I suggest you install an XSLT processor, such as Sablotron

But you would still need to write DTD/Schemas for them - unless I'm very much mistaken - without a DTD or Schema an XML doc can never be valid, because the validity of a document is a comparison with its definition.

Last edited by brothercake; 12-27-2002 at 07:50 PM..
brothercake is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:21 AM.


Advertisement
Log in to turn off these ads.