Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

how to do record based index?

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is sample.xml file

<Filter>
<Finfo>
<rec>1</rec>
<filterId>01</filterId>
<msgid>ADMCERR001</msgid>
<startTime>00</startTime>
<endTime>2359</endTime>
<filtDays>All</filtDays>
<notFiltCnt>10</notFiltCnt>
<filtCnt>30</filtCnt>
<custMesg>ADMCERR is not Filtered</custMesg>
<status>3</status>
</Finfo>
<Finfo>
<rec>2</rec>
<filterId>02</filterId>
<msgid>ADMCMSG001</msgid>
<startTime>0000</startTime>
<endTime>2359</endTime>
<filtDays>All</filtDays>
<notFiltCnt>10</notFiltCnt>
<filtCnt>30</filtCnt>
<custMesg>ADMCMSG is Filtered</custMesg>
<status>3</status>
</Finfo>
<!-- ***************************** -->
<!-- OS Module : File System Messages -->
<!-- ***************************** -->
<Finfo>
<rec>3</rec>
<filterId>03</filterId>
<msgid>ADMCFS001</msgid>
<startTime>0000</startTime>
<endTime>2359</endTime>
<filtDays>All</filtDays>
<notFiltCnt>10</notFiltCnt>
<filtCnt>30</filtCnt>
<custMesg>ADMCAVAYA is Filtered</custMesg>
<status>1</status>
</Finfo>
</Filter>


I have Dom parser it is giving the following o/p
1
01
ADMCERR001

I open & read this file manually and update this file.

suppose I delete the 2nd record of the file.

3 rd record should be taken as 2 nd record.

(actual Record should be n no of records)
how to do write java program?

pls Give the idea.
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post duplicates. Continue the discussion in the XML forum.
Thanks.

- m
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic