Extract an XML tag with its contents
Posted: Thu May 22, 2008 10:35 pm
Hello,
I managed to do simple things like extract an URL but I am having a headache trying to extract an XML tag with its content.
<Grid.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF717171" Offset="1"/>
<GradientStop Color="#FFFFFFFF" Offset="0.498"/>
<GradientStop Color="#FF727272" Offset="0"/>
<GradientStop Color="#FFA4A4A4" Offset="0.858"/>
<GradientStop Color="#FFFFFFFF" Offset="0.098"/>
</LinearGradientBrush>
</Grid.Background>
By using "Restrict to between tags", i know i'm hitting the desired part of my text,
but i couldn't manage to extract the text, only remove it by using "Remove all" as a sub filter.
When i add "Extract matches" as a subfilter, the result is simply blank.
Filter used :
"Restrict to between tags, including the start and end of tag"
"Remove All"
Actually it works, it removes what i wanted to extract BUT Is there any way to "Invert" this filter ?
If not, do you know any other way to do it easily ?
Thanks for your help !
Best regards.
I managed to do simple things like extract an URL but I am having a headache trying to extract an XML tag with its content.
<Grid.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF717171" Offset="1"/>
<GradientStop Color="#FFFFFFFF" Offset="0.498"/>
<GradientStop Color="#FF727272" Offset="0"/>
<GradientStop Color="#FFA4A4A4" Offset="0.858"/>
<GradientStop Color="#FFFFFFFF" Offset="0.098"/>
</LinearGradientBrush>
</Grid.Background>
By using "Restrict to between tags", i know i'm hitting the desired part of my text,
but i couldn't manage to extract the text, only remove it by using "Remove all" as a sub filter.
When i add "Extract matches" as a subfilter, the result is simply blank.
Filter used :
"Restrict to between tags, including the start and end of tag"
"Remove All"
Actually it works, it removes what i wanted to extract BUT Is there any way to "Invert" this filter ?
If not, do you know any other way to do it easily ?
Thanks for your help !
Best regards.