Hello, I am writing a visual tool to write xml file based upon the dtd file. The user will load the dtd file, elements and attributes will be shown in a tree form. The user will select the elements/attributes and xml file will be generated. Here, I have no idea how to deal with the cyclic dtd's. Like: <!ELEMENT A (B)*> <!ATTLIST A name CDATA #IMPLIED> <!ELEMENT B (A|X|Y)> <!ELEMENT X (#PCDATA)> <!ELEMENT Y (#PCDATA)> Please help me. Regards Sanjay.