On 2013-04-13, Stefan Bodewig wrote: > On 2013-04-11, David Rees wrote:
>> On 4/11/13 1:06 PM, David Rees wrote: >>> I've actually tracked it down to two things in the XPathContext.getXPath. >>> The biggest is actually the "replace(SEP + SEP, SEP)". When I remove >>> that my XMLUnit benchmarks go from 0.11 to 0.06. I haven't played with >>> it enough yet to know enough about why that line is there so I can >>> replace it. > I don't recall under which circumstances it happens but there are > certain edge cases. The document node itself is used like an element named "" so there is an initial Level with XPath "/" and when the document element is added we get two consecutive slashes. I've rewritten the XPath building to account for the special case and avoind the replace call. Actually there is an additional possibility for levels with empty names in the default case of appendChildren - but I don't think that can be triggered at all. Stefan ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Xmlunit-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xmlunit-general
