-
please help to solve this pblm
iam reading some value from a file and write to another file.In the reading file contains
<edm:fromReference>268520629#268771030</edm:fromReference>
<edm:OrderItem>
<edm:Order orderID="1024560"/>
<edm:fromReference>1024560</edm:fromReference>
<edm:fromLegalEntity legalEntityID="01000908">
<edm:Identifier>01000908</edm:Identifier>
</edm:fromLegalEntity>
</edm:OrderItem>
these following i want output 1024560 (<edm:fromReference>) inside order item .......in the above case(<edm:fromReference>) comes two times but inside<edm:OrderItem>&</edm:OrderItem>i only need.....these are differnt lines.....can any body please help with code
the following code iused
final String START4_TAG= "<edm:fromReference>";
final String END4_TAG= "</edm:fromReference>";
boolean efound=false
if(line.indexOf(START4_TAG) > -1 ) { //this code handle edm.from refernce
start6Pos = line.indexOf(START4_TAG);
System.out.println("start pos"+start6Pos);
System.out.println("index"+START4_TAG);
start6Pos += START4_TAG.length();
end6Pos = line.indexOf(END4_TAG);
System.out.println("end pos"+end4Pos);
efound10=true;
//while (endPos == -1 && line != null)
}
else
efound10=false;
iwant to change what need to be handle above situation
have no time to implement xml parser,and file is not fully xml...i showed some part of file......all remaining may be just text file.Therfore please tell whta modification i neeed to done above code
-
um ok, well tell me if im understanding you correctly. you just want a program to read through the text file above and then locate/print out 1024560? if so, you could just read in the file, locate "<edm:fromReference>", and then use StringTokenizer to just cut out the number.
-
u r correct yaar,iam using above code,can u tell me what modification needed in exisiting code
Similar Threads
-
By koraal in forum VB Classic
Replies: 3
Last Post: 11-03-2006, 03:50 PM
-
Replies: 4
Last Post: 10-18-2005, 08:21 AM
-
Replies: 0
Last Post: 09-23-2005, 02:17 AM
-
By Bee Kiat in forum ASP.NET
Replies: 3
Last Post: 07-21-2000, 04:41 PM
-
By Rattagarn V. in forum VB Classic
Replies: 0
Last Post: 06-27-2000, 11:39 AM
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
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|