Actually I am using a dtd.
--- cut here (dtd) ---
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT mo_graph (mo_node+)>
<!ELEMENT mo_node (mt_message, mo_edge_list?)>
<!ATTLIST mo_node
name CDATA #REQUIRED
id CDATA #REQUIRED
isFirstNode CDATA "false"
>
<!ELEMENT mt_message (#PCDATA)>
<!ELEMENT mo_edge_list (mo_edge+)>
<!ELEMENT mo_edge (command, result?)>
<!ATTLIST mo_edge
target NMTOKEN #REQUIRED
>
<!ELEMENT command (#PCDATA)>
<!ELEMENT result (#PCDATA)>
--- cut here (dtd) ---
--- cut here (xml excerpt) ---
<mo_graph>
<!-- N? especial: in?cio de registro para amigo -->
<mo_node id="INITIATE_FRIEND_REGISTRY" name="intro friend">
<mt_message>SURPRESA! \n Alguem quer MANDAR um PRESENTE p/ vc! P/ receber, envie p/ 555 o comando:\n CEL\n e registre MARCA/MODELO do seu CELular. Eh DE GRACA!</mt_message>
<mo_edge_list>
<mo_edge target="2">
<command>^CEL.*|^Marca.*|^Modelo.*</command>
</mo_edge>
<mo_edge target="INITITATE_FRIEND_REGISTRY_AGAIN">
<command></command>
</mo_edge>
</mo_edge_list>
</mo_node>
</mo_graph>
--- cut here (xml excerpt) ---