School project?
Seetha Rama Krishna wrote:
> Hi Techies,
> I am reading an xml file using DOM. Here is my xml file
>
>
>
>12345
>TODAY
>date
>
>
>12345
>TODAY
>date
>
>
>
>
>
>
>
> Here i want to get onlyand not the child nodes of
>, , when i read the xml file . How can I do this one.
>
> I tried with the following code.
> DocumentBuilderFactory factory = DocumentBuilderFactory
> .newInstance();
> DocumentBuilder parser = factory.newDocumentBuilder();
> Document document = parser.parse(xmlFileName);
> Element documentElement = document.getDocumentElement();
> NodeList todayNodeList = documentElement
> .getElementsByTagName("Today");
>
> How can get only first level of nodes. That is I want get
> only Today,EndOfWeek,EndOfMonth.
>
>
>
>
> regards,
> Krishna
>
>
> regards,
> ramu