I have written a code to parse a DTD file using DTDParser jar.the code is
public static void main(String[] arg)
{
BufferedReader buff=new BufferedReader(new FileReader("abc.dtd"));
DTDParser dtd=new DTDParser(bff);
DTD dt=dtd.Parse();
System.out.println(dt.elements);
}
and output i get is
message=com.wutka.DTDElement@c20e24...etc same as this for all elements with with diff @no changes.. But i need just the element names... also help me in putting those values in an array so i can use it for further vlidation...thank u..