9 Replies Latest reply on Mar 22, 2012 6:16 AM by 925315

    Using Regular Expression in XML parsing

    925315
      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