================================================================================
note.xml
================================================================================

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE note [
<!ELEMENT note (to,from,heading,body,footer?)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
<!ELEMENT footer (#PCDATA)>
<!ENTITY nbsp "&#xA0;">
<!ENTITY writer "Writer: Donald Duck.">
<!ENTITY copyright "Copyright: W3Schools.">
]>
<note>
  <to>Tove</to>
  <from>Jani</from>
  <heading>Reminder</heading>
  <body>Don't forget me this weekend!</body>
  <footer>&writer;&nbsp;&copyright;</footer>
</note>

--------------------------------------------------------------------------------

(document
  (prolog
    (XMLDecl
      (VersionNum)
      (EncName))
    (doctypedecl
      (Name)
      (elementdecl
        (Name)
        (contentspec
          (children
            (Name)
            (Name)
            (Name)
            (Name)
            (Name))))
      (elementdecl
        (Name)
        (contentspec
          (Mixed)))
      (elementdecl
        (Name)
        (contentspec
          (Mixed)))
      (elementdecl
        (Name)
        (contentspec
          (Mixed)))
      (elementdecl
        (Name)
        (contentspec
          (Mixed)))
      (elementdecl
        (Name)
        (contentspec
          (Mixed)))
      (GEDecl
        (Name)
        (EntityValue
          (CharRef)))
      (GEDecl
        (Name)
        (EntityValue))
      (GEDecl
        (Name)
        (EntityValue))))
  (element
    (STag
      (Name))
    (content
      (CharData)
      (element
        (STag
          (Name))
        (content
          (CharData))
        (ETag
          (Name)))
      (CharData)
      (element
        (STag
          (Name))
        (content
          (CharData))
        (ETag
          (Name)))
      (CharData)
      (element
        (STag
          (Name))
        (content
          (CharData))
        (ETag
          (Name)))
      (CharData)
      (element
        (STag
          (Name))
        (content
          (CharData))
        (ETag
          (Name)))
      (CharData)
      (element
        (STag
          (Name))
        (content
          (EntityRef
            (Name))
          (EntityRef
            (Name))
          (EntityRef
            (Name)))
        (ETag
          (Name)))
      (CharData))
    (ETag
      (Name))))

================================================================================
address.xml
================================================================================

<?xml version = "1.0" encoding = "UTF-8" standalone = "no" ?>
<!DOCTYPE address SYSTEM "address.dtd">
<address>
  <name>Tanmay Patil</name>
  <company>TutorialsPoint</company>
  <phone>(011) 123-4567</phone>
</address>

--------------------------------------------------------------------------------

(document
  (prolog
    (XMLDecl
      (VersionNum)
      (EncName))
    (doctypedecl
      (Name)
      (ExternalID
        (SystemLiteral
          (URI)))))
  (element
    (STag
      (Name))
    (content
      (CharData)
      (element
        (STag
          (Name))
        (content
          (CharData))
        (ETag
          (Name)))
      (CharData)
      (element
        (STag
          (Name))
        (content
          (CharData))
        (ETag
          (Name)))
      (CharData)
      (element
        (STag
          (Name))
        (content
          (CharData))
        (ETag
          (Name)))
      (CharData))
    (ETag
      (Name))))
