Trimming the XML file

Posted by Sathish on Stack Overflow See other posts from Stack Overflow or by Sathish
Published on 2010-03-30T09:43:46Z Indexed on 2010/03/30 9:53 UTC
Read the original article Hit count: 384

Filed under:

I have a XML file as shown below

<NewDataSet>
- <T>
  <P /> 
  <C>1</C> 
  <M /> 
  </T>
- <T>
  <P /> 
  <C>1</C> 
  <M /> 
  </T>
- <T>
  <P /> 
  <C>1</C> 
  <M /> 
  </T>
- <T>
  <P /> 
  <C>1</C> 
  <M /> 
  </T>
- <T>
  <P /> 
  <C>2</C> 
  <M>44</M> 
  </T>
- <T>
  <P /> 
  <C>2</C> 
  <M>45</M> 
  </T>
- <T>
  <P /> 
  <C>2</C> 
  <M>46</M> 
  </T>
</NewDataSet>

Question - Basicall i should remove the block

<T>
  <P /> 
  <C>1</C> 
  <M /> 
  </T>

that does not have <M> Value

© Stack Overflow or respective owner

Related posts about c#