|
-
please help me
Iam reading a following part of file and write to another file... iwant to handle this code.....as single line
<edm:code>update</edm:code></edm:OrderTransactionType><edm:despatchTime>2006-10-13T02:31:28Z</edm:despatchTime><edm:OrderTransactionResult><edm:code>PARTIAL_PASS</edm:code></edm:OrderTransactionResult><edm:Order>
from the above program....... iwant output PARTIAL_PASS.I use delimiter as<edm:code> but it takes only first occurence therfor i got output as update only.Can any body helpme wht changes done in abobve code.I only want to change existing code...not ready to use XML parser.please can any body help me....
START8_TAG="<edm:code>";
final string END8_TAG="</edm:code>";
if((logging)&&(line.indexOf("</edm:OrderTransactionResult>")>-1)) {
start7Pos= line.indexOf(START8_TAG);
start7Pos= START8_TAG.length();
System.out.println("index"+START8_TAG);
//start7Pos+= START8_TAG.length();
System.out.println("sstart position"+start7Pos);
System.out.println("end tag"+END8_TAG);
end7Pos = line.indexOf(END8_TAG);
// end7Pos = END8_TAG.length();
System.out.println("index"+ end7Pos);
System.out.println("end tag line "+ line);
System.out.println("line.substring"+line.substring(start7Pos,end7Pos));
efound11=true;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks