parameters: ( element, filterpath, old, new, count=-1)
docstring: Replace strings within text elements or attributes
      
      >>> XML1, XML2 = _testdata()
      >>> filter = ElementFilter(XML1, "channel/title")
      >>> filter.data()
      ['XML.com']
      >>> filter.replace('XML', 'xml')
      >>> filter.data()
      ['xml.com']
      >>> filter = ElementFilter(XML2, "category/item/@colour")
      >>> filter.data()
      ['red', 'blue', 'yellow', 'pink', 'blue', 'pink', 'orange', 'blue']
      >>> filter.replace('pink', 'lilac')
      >>> filter.data()
      ['red', 'blue', 'yellow', 'lilac', 'blue', 'lilac', 'orange', 'blue']
docstring_summary: Replace strings within text elements or attributes
      
      >>> XML1, XML2 = _testdata()
      >>> filter = ElementFilter(XML1, "channel/title")
      >>> filter.data()
      ['XML.com']
      >>> filter.replace('XML', 'xml')
      >>> filter.data()
      ['xml.com']
      >>> filter = ElementFilter(XML2, "category/item/
docstring_tokens: Replace strings within text elements or attributes >>> XML1 XML2 = _testdata () >>> filter = ElementFilter ( XML1 channel / title ) >>> filter . data () [ XML . com ] >>> filter . replace ( XML xml ) >>> filter . data () [ xml . com ] >>> filter = ElementFilter ( XML2 category / item /
function: def replace( element, filterpath, old, new, count=-1):
      '''
      Replace strings within text elements or attributes
      
      >>> XML1, XML2 = _testdata()
      >>> filter = ElementFilter(XML1, "channel/title")
      >>> filter.data()
      ['XML.com']
      >>> filter.replace('XML', 'xml')
      >>> filter.data()
      ['xml.com']
      >>> filter = ElementFilter(XML2, "category/item/@colour")
      >>> filter.data()
      ['red', 'blue', 'yellow', 'pink', 'blue', 'pink', 'orange', 'blue']
      >>> filter.replace('pink', 'lilac')
      >>> filter.data()
      ['red', 'blue', 'yellow', 'lilac', 'blue', 'lilac', 'orange', 'blue']
      '''
      ElementFilter(element, filterpath).replace(old, new, count)
function_tokens: def replace ( element , filterpath , old , new , count = - 1 ) : ElementFilter ( element , filterpath ) . replace ( old , new , count )