Created
June 15, 2018 23:07
-
-
Save sshaw/621ea4513a28f2271ee3741415a56d00 to your computer and use it in GitHub Desktop.
Example of Apple Property List (Plist) DTD Validation With xmllint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> | |
<key>B</key> | |
<string>sshaw</string> | |
<string>DDEX</string> | |
</dict> | |
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/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