facebook

Disabling XML Validation

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #197832 Reply

    jdjwright
    Member

    Is it possible to disable validation in the XML editor. I am on a dial-up network at home and everytime (or so it seems) I save an XML file my modem starts dialling up.

    Regards,

    Joss

    PS: I am using Windows 2000, Eclipse v2.1.0 build 200303272130, MyEclipse 2.5.1.

    #197835 Reply

    Scott Anderson
    Participant

    Joss,

    Yes, you can disable validation using the preference setting in the XML editor’s preference page. The XML files will still be checked to ensure that they are well-formed, but they will not be checked against their DTD’s, which is the cause of your issue.

    –Scott
    MyEclipse Support

    #197883 Reply

    jdjwright
    Member

    Scott,

    If you mean Window Menu > Preferences > MyEclipse > Editors > XML Editor > XML Deployment Descriptors > Disable Validation, I’ve already tried that and it does not work.

    The problem occurs when I try to edit a Struts Config XML file in WEB-INF. Does MyEclipse only disable XML Validation for DTDs it ‘knows’ about? If so is there any way of adding further DTDs?

    Regards,

    Joss

    #197884 Reply

    Scott Anderson
    Participant

    Joss,

    Yes, that’s the correct setting and it disables validation for all XML files in the WEB-INF and META-INF directories. But to be specific, this setting disables the validation check, meaning that the file won’t be checked against the DTD, but it will not disable the well-formedness check, just to make sure that the file is valid XML. However this check is done with a fast Sax parse on save and no network resources are referenced.

    I just retested with a struts-config.xml file by turning validation off and inserting an incorrect tag after the struts-config tag. Like this:

    
    <struts-config>
       <badtag/>
    
    
    As expected, I received no error markers since the document continues to be well-formed, although it is no longer valid.
    
    --Scott
    MyEclipse Support

    #197914 Reply

    ethan.wolf
    Member

    Joss,
    If turning off validation by the editor didn’t work, perhaps the validation is occuring through the XDoclet external project builder? For example, with an EJB project, I opened the project properties and changed XDoclet Configurations-> Standard EJB-> ejbdoclet-> deploymentdescriptors->ValidateXML to false to disable validation during project builds.

    Best of luck.
    -Ethan

    #197920 Reply

    Scott Anderson
    Participant

    Ethan,

    Excellent point! I completely forgot that XDoclet has its own settings. Thank you very much for pointing it out.

    –Scott
    MyEclipse Support

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Disabling XML Validation

You must be logged in to post in the forum log in