HOW TO PROGRAM IN JAVA WHERE I REQUIRE OUTPUT AS XML AND INPUT IS COMBINATION OF XML WITH SOME UNWANTED CHARACTERS
    <RECORD><API_VER>Java API v3.2.11.0</API_VER><DATE>2012-05-05</DATE><TIME>06:50:48.517</TIME><HOST>neoss01-th</HOST><IP>10.87.81.53</IP><PORT>7803</PORT><SERVER>nevoss_managed</SERVER><MESSAGEID>JASPER_ExecuteQueueRuntime_ExecuteThreadCurrentIdleCount</MESSAGEID><LOCATION>com.bt.ai.JasperAlert.log(JasperAlert.java:13)</LOCATION><CATEGORY>E</CATEGORY><SEVERITY>INFO</SEVERITY><PCK><USR>weblogic.soc</USR><SYS>nevoss_managed</SYS><LOC>nevoss_prod01</LOC><SEQ>1311828609581</SEQ></PCK><TEXT>The current number of idle threads</TEXT><CALLER_ID>null</CALLER_ID></RECORD>
    <RECORD><API_VER>Java API v3.2.11.0</API_VER><DATE>2012-05-05</DATE><TIME>06:50:48.519</TIME><HOST>neoss01-th</HOST><IP>10.87.81.53</IP><PORT>7803</PORT><SERVER>nevoss_managed</SERVER><MESSAGEID>JASPER_ExecuteQueueRuntime_ExecuteThreadCurrentIdleCount</MESSAGEID><LOCATION>com.bt.ai.JasperAlert.log(JasperAlert.java:13)</LOCATION><CATEGORY>E</CATEGORY><SEVERITY>INFO</SEVERITY><PCK><USR>weblogic.ker</USR><SYS>nevoss_managed</SYS><LOC>nevoss_prod01</LOC><SEQ>1311828609581</SEQ></PCK><TEXT>The current number of idle threads</TEXT><CALLER_ID>null</CALLER_ID></RECORD>

I have above unwanted content with wanted xml afterwards in a log file, i need a program which can remove the above content and give the output of the remaining as xml

the xml content which i need is as for ex: follows

    <?xml version="1.0"?>
    <note>
        <to>Tove</to>
        <from>Jani</from>
        <heading>Reminder</heading>
        <body>Don't forget me this weekend!</body>
    </note>


The problem is log file contains the repeated format of unwanted content and wanted content(i.e like above unwanted content and wanted content there may be upto 10,000 times)

I need the o/p as xml of only wanted content,

I tried to take the whole xml as string and used startindex and endindex to found where the wanted xml starts and ends but i ended up in confusion. 

please help me on this?  
    

HOW TO PROGRAM IN JAVA WHERE I REQUIRE OUTPUT AS XML AND INPUT IS COMBINATION OF XML WITH SOME UNWANTED CHARACTERS
===

    <RECORD><API_VER>Java API v3.2.11.0</API_VER><DATE>2012-05-05</DATE><TIME>06:50:48.517</TIME><HOST>neoss01-th</HOST><IP>10.87.81.53</IP><PORT>7803</PORT><SERVER>nevoss_managed</SERVER><MESSAGEID>JASPER_ExecuteQueueRuntime_ExecuteThreadCurrentIdleCount</MESSAGEID><LOCATION>com.bt.ai.JasperAlert.log(JasperAlert.java:13)</LOCATION><CATEGORY>E</CATEGORY><SEVERITY>INFO</SEVERITY><PCK><USR>weblogic.soc</USR><SYS>nevoss_managed</SYS><LOC>nevoss_prod01</LOC><SEQ>1311828609581</SEQ></PCK><TEXT>The current number of idle threads</TEXT><CALLER_ID>null</CALLER_ID></RECORD>
    <RECORD><API_VER>Java API v3.2.11.0</API_VER><DATE>2012-05-05</DATE><TIME>06:50:48.519</TIME><HOST>neoss01-th</HOST><IP>10.87.81.53</IP><PORT>7803</PORT><SERVER>nevoss_managed</SERVER><MESSAGEID>JASPER_ExecuteQueueRuntime_ExecuteThreadCurrentIdleCount</MESSAGEID><LOCATION>com.bt.ai.JasperAlert.log(JasperAlert.java:13)</LOCATION><CATEGORY>E</CATEGORY><SEVERITY>INFO</SEVERITY><PCK><USR>weblogic.ker</USR><SYS>nevoss_managed</SYS><LOC>nevoss_prod01</LOC><SEQ>1311828609581</SEQ></PCK><TEXT>The current number of idle threads</TEXT><CALLER_ID>null</CALLER_ID></RECORD>

I have above unwanted content with wanted xml afterwards in a log file, i need a program which can remove the above content and give the output of the remaining as xml

the xml content which i need is as for ex: follows

    <?xml version="1.0"?>
    <note>
        <to>Tove</to>
        <from>Jani</from>
        <heading>Reminder</heading>
        <body>Don't forget me this weekend!</body>
    </note>


The problem is log file contains the repeated format of unwanted content and wanted content(i.e like above unwanted content and wanted content there may be upto 10,000 times)

I need the o/p as xml of only wanted content,

I tried to take the whole xml as string and used startindex and endindex to found where the wanted xml starts and ends but i ended up in confusion. 

please help me on this?  
    
