java how can I get all elements name from a xml file
I'm new to xml. I'd like to get all the element name from a xml file with xml dom parser, for example the xml file is,
(element's name is dynamic)

    <aaa>
      <bbb>
        <id/>
        <name/>
      <bbb>
      <bbb>
        <id/>
        <name/>
      <bbb>
      <ccc>
        <time/>
        <date/>
      </ccc>
       ....
    </aaa>

and I want to create a list like this;

aaa,bbb,id,name,ccc,time,date

How can I do it?

java how can I get all elements name from a xml file
===

I'm new to xml. I'd like to get all the element name from a xml file with xml dom parser, for example the xml file is,
(element's name is dynamic)

    <aaa>
      <bbb>
        <id/>
        <name/>
      <bbb>
      <bbb>
        <id/>
        <name/>
      <bbb>
      <ccc>
        <time/>
        <date/>
      </ccc>
       ....
    </aaa>

and I want to create a list like this;

aaa,bbb,id,name,ccc,time,date

How can I do it?
