looks good to me, but the doc provides no sample and i don't really
know pythonelement, any easy sample to get started?
say I got this following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay
PaymentService v1//EN"
"
http://dtd.worldpay.com/
paymentService_v1.dtd">
<paymentService version="1.4" merchantCode="1234">
<reply>
<error code="5"><![CDATA[XML failed validation: Invalid payment
details : Card number must be at least 10 digits.:1212****]]>
</error>
</reply>
</paymentService>
and I want to get the error code which is 5 in this case? thanks.
On Jul 19, 1:41 am, Andrew Lunny <
alu...@gmail.com> wrote:
>
https://github.com/racker/node-elementtreehas worked quite well in my
> experience.
>
> One catch I've found is that absolute XPath expressions don't work, so
> instead of:
>
> xmlDoc.get("/paymentService/reply/error")
>
> would need to say
>
> xmlDoc._root.get("paymentService/reply/error")
>
> Other than that (which is probably an easy patch, but I think they want to
> maintain API compatibility with the python source library), it's been fine.
>
> Andrew
>