def evaluate(xpath, document): element = parse(document) return compile(xpath).evaluate(element)
def fromString(cls, string): """ Return a C{XMLRepresentation} with given content. """ return cls(xml.parse(string))