Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using Regular Expression in XML parsing

925315Mar 21 2012 — edited Mar 22 2012
Hi

I have an XML File with the node names like "ns670:PTC_FareBreakdown" etc. Now i need to get to the "PTC_FareBreakdown" node but the "ns670:" expression is not static and keeps changing dynamically. Is there any way to get the element by the tag name "PTC_FareBreakdown" using some regular expression in Java using a DOM Parser? Its really urgent.

<PTC_FareBreakdowns SequenceNo="1">
<ns670:PTC_FareBreakdown>...</ns670:PTC_FareBreakdown>
<ns690:PTC_FareBreakdown>...</ns690:PTC_FareBreakdown>
<ns890:PTC_FareBreakdown>...</ns890:PTC_FareBreakdown>
</PTC_FareBreakdowns>

Thanks & Regards

Tarni Sharma
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 19 2012
Added on Mar 21 2012
9 comments
5,024 views