IBM®
Skip to main content
    Country/region [select]      Terms of use
 
 
      
     Home      Products      Services & solutions      Support & downloads      My account     

developerWorks > Sample IT projects >
developerWorks
Document clipping with annotation
How to keep the good stuff and throw out the rest

Return to article

Annotator for XPath comments example


<?xml version='1.0' ?>
<annot version="1.0">
    <description take-effect="before" target="/HTML[1]/BODY[1]/*[1]">
        <remove />
    </description>

    <description 
take-effect="before" target="/descendant::comment()[contains(.,'begin story 1')]"
>
        <keep />
    </description>

    <description 
take-effect="before" target="/descendant::comment()[contains(.,'end story 1')]"
>
        <remove />
    </description>

    <description take-effect="before" target="/descendant::comment()[contains(.,'begin story 2')]">
        <keep />
    </description>

    <description take-effect="before" target="/descendant::comment()[contains(.,'end story 2')]">
        <remove />
    </description>
</annot>



developerWorks > Sample IT projects >
developerWorks
  About IBM  |  Privacy  |  Terms of use  |  Contact