Java XML parsing: taking inner XML using SAX

前端 未结 1 1375
粉色の甜心
粉色の甜心 2021-01-22 09:15

I\'m parsing an XML file with SAX and at some point I need the inner XML of an element. E.g., for the following XML


  def

        
相关标签:
1条回答
  • 2021-01-22 10:14

    For this type of situation I suggest using 2 content handlers. The first is responsible for finding the relevant part of the document, and the second for processing the content. My answer to a similar question (see link below) demonstrates how to implement this approach:

    • Using SAX to parse common XML elements
    0 讨论(0)
提交回复
热议问题