Hi, I think the jdom library gives you alot of flexibility with XML.. I have found it easy to use. Have a look at this explanation: http://www.ibm.com/developerworks/java/library/j-jdom/ Regards --- On Wed, 3/9/11, bambang passion <bambang.teleinfocomproj...@gmail.com> wrote:
From: bambang passion <bambang.teleinfocomproj...@gmail.com> Subject: Re: [java ee programming] How to parse xml To: rafal_lac...@wp.pl Cc: "Java EE Programming with Passion!" <java-ee-j2ee-programming-with-passion@googlegroups.com> Date: Wednesday, March 9, 2011, 4:58 AM Hi, This site also a good place to go : http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html good luck bp On Tue, Mar 8, 2011 at 10:37 AM, bambang passion <bambang.teleinfocomproj...@gmail.com> wrote: HI : You can go to : http://www.javapassion.com/portal/web-services-programming-with-passion/web-services-programming-with-passion tq bp 2011/3/7 Rafał Laczek <rafal_lac...@wp.pl> Hi, In my code I have dropMsg String variable. Variable includes list of messages. The messages are as plain xml. Finally I must use each field. But to do it I must parse it into Data and String. Can maybe somebody know any good tutorial, etc. how to do it. Thanks in advance for help! Regards, Rafal String dropMsgList = .. System.out.println(dropMsgList); <Messages> <Msg> <MsgTime>2011.03.07 12:59:40</MsgTime> <ValidFromTime>2011.03.07 12:59</ValidFromTime> <ValidToTime>2011.03.07 16:43</ValidToTime> <MsgText>Test message1 MsgText> </Msg> <Msg> <MsgTime>2011.03.07 11:36:21</MsgTime> <ValidFromTime>2011.03.07 11:35</ValidFromTime> <ValidToTime>2011.03.07 15:21</ValidToTime> <MsgText>Test message2</MsgText> </Msg> </Messages> -- You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en -- You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en -- You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en