Example of Apple Property List (Plist) DTD Validation With xmllint
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>A</key> | |
<string>sshaw</string> | |
</dict> | |
</plist> |
~/code/ruby/class2 >xmllint --noout --valid ~/Desktop/good.plist | |
~/code/ruby/class2 >xmllint --noout --valid ~/Desktop/bad.plist | |
/Users/sshaw/Desktop/bad.plist:9: element dict: validity error : Element dict content does not follow the DTD, expecting (key , (array | data | date | dict | real | integer | string | true | false))*, got (key key string string ) | |
</dict> | |
^ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment