Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Validating XML

  1. #1
    New to the CF scene
    Join Date
    Dec 2002
    Location
    Maryland
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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!

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Wouldn't it be easier to write a Schema or DTD to validate the XML file?

  • #3
    New to the CF scene
    Join Date
    Dec 2002
    Location
    Maryland
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 08:50 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •