Created
March 23, 2012 16:08
-
-
Save lhayhurst/2172243 to your computer and use it in GitHub Desktop.
Character interchange document: Basic DTD + XML, with and without attributes
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"?> | |
<!DOCTYPE character_interchange_document [ | |
<!ELEMENT character_interchange_document (character+)> | |
<!ELEMENT character (character_name,playername,role)> | |
<!ELEMENT character_name (#PCDATA)> | |
<!ELEMENT playername (#PCDATA)> | |
<!ELEMENT role (#PCDATA)> | |
]> | |
<character_interchange_document> | |
<character> | |
<character_name>harsk</character_name> | |
<role>npc</role> | |
<playername>bob</playername> | |
</character> | |
</character_interchange_document> |
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"?> | |
<!DOCTYPE character_interchange_document [ | |
<!ELEMENT character_interchange_document (character+)> | |
<!ELEMENT character EMPTY> | |
<!ATTLIST character | |
name CDATA #REQUIRED | |
playername CDATA #REQUIRED | |
role (pc | npc) "pc" | |
> | |
]> | |
<character_interchange_document> | |
<character name="harsk" role="npc" playername="bob"></character> | |
<character name="valeros" role="npc" playername="bill"></character> | |
</character_interchange_document> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Perhaps we can combine the two: https://gist.github.com/2172980