Using a dash in a xpath does not work in py-dom-xpath
Question: I'm curreny using [py-dom-xpath](http://code.google.com/p/py-dom-
xpath/downloads/list) with python 2.7.2 under Debian 4.1.1-21.  
Everything works pretty well, instead of one XML element.

Whenever I try to check a XML document for a xpath like `//AAA/BBB/CCC-DDD`
the path is not found. It's the only node with a dash `-` in it. I already
tried to escape the dash, but that didn't work.

I also tried `//*[name()='CCC-DDD']` and the `starts-with` and `contains`
statement. The element is definately in the XML and the spelling is also
correct.

I tried an [online xpath validation
site](http://chris.photobooks.com/xml/default.htm), and it works flawless
there, even with the dash.

Any help is appreciated.


Answer: Is using [lxml](http://codespeak.net/lxml/) an option? Dashes in the XPath
work fine there:

    
    
    import lxml.etree as ET
    
    content = '''<root><AAA><BBB><CCC-DDD>xyz</CCC-DDD></BBB></AAA></root>'''
    doc = ET.fromstring(content)
    print(doc.xpath('//AAA/BBB/CCC-DDD'))
    

yields

    
    
    [<Element CCC-DDD at 0xb746f504>]
    

