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 2 of 2
  1. #1
    Regular Coder
    Join Date
    Apr 2007
    Posts
    179
    Thanks
    17
    Thanked 0 Times in 0 Posts

    parse XML and DTD

    It is said an XML file need a processor to check its validation against a x.DTD document to decide if it is valid or not.

    But more often I see an XML file comes without a corresponding x.DTD file, and still the XML file is validated. In this case (without a DTD file included in an XML file), is there some kind of default DTD file to set basic rules for the XML? Otherwise, how does it work?

    This situation also happens when the server-returned xml string without a DTD included. But the ajax's responseXML can still use it. Why so?



    Thanks

    Scott

  • #2
    Regular Coder Samhain13's Avatar
    Join Date
    Aug 2008
    Location
    Pilipinas
    Posts
    169
    Thanks
    4
    Thanked 18 Times in 18 Posts
    You can't validate against nothing. As I understand, if an XML has no DTD (where it is validated against), it is only checked for well-formedness. But, I could be wrong...

    As to the responseXML part, again if the XML is well-formed, it should still work even if it has no DTD.


  •  

    Posting Permissions

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