skyman
skyman

Reputation: 2335

How to correct for no grammar constraints error

I have a simple XML document that is flagged (correctly) in Eclipse as having no grammar. I use the file to preload a database on initialisation. Is there a "generic" DTD or Schema that I could apply to this document (and similar - I have over 15 of them) to eliminate this warning and be more correct in my XML structure?

<AbnormalFlags>
    <AbnormalFlag> 
        <code>H</code> 
        <description>High</description>
    </AbnormalFlag>
    <AbnormalFlag> 
        <code>L</code> 
        <description>Low</description>
    </AbnormalFlag>
    <AbnormalFlag> 
        <code>A</code> 
        <description>Abnormal</description>
    </AbnormalFlag>
</AbnormalFlags>

Upvotes: 0

Views: 30

Answers (1)

Juned Ahsan
Juned Ahsan

Reputation: 68715

Just add this on top of your xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>

Upvotes: 1

Related Questions