Xml文件  |  40行  |  833 B

<doc>
  <parent>
    <discarded>
      <discarded/>
    </discarded>
    <preserved/>
    This text node must be discarded
    <discarded>
      <discarded/>
    </discarded>
    <preserved>
      content1
      <child1></child1>
      <child2>content2</child2>
      <preserved>too</preserved>
      <child2>content3</child2>
      <preserved></preserved>
      <child2>content4</child2>
      <preserved/>
      <child2>content5</child2>
      content6
    </preserved>
    This text node must be discarded
    <discarded>
      <discarded/>
    </discarded>
    This text node must be discarded
    <preserved></preserved>
    This text node must be discarded
    <preserved/>
    This text node must be discarded
    <discarded>
      <discarded/>
    </discarded>
    This text node must be discarded
  </parent>
</doc>