requests-xml icon indicating copy to clipboard operation
requests-xml copied to clipboard

Add support for passing an XML namespace map through requests_xml

Open dt-iland opened this issue 7 years ago • 2 comments

requests_xml seems to return XML with namespaces without issue. However, unless I've missed something, it doesn't appear there is a way to pass a XML NSMAP variable through requests_xml so that you can easily access XML with namespaces using XPATH.

For the instances where I'm forced to use XML namespaces, I've had to revert back to using lxml/etree. Would be be possible to add the NSMAP functionality to the top level requests_xml functions so that the XML namespace mapping is properly passed down to the lxml functions used under-the-hood?

dt-iland avatar Sep 11 '18 15:09 dt-iland

Got it, it's something I overlooked when first writing it. I'll work on it this weekend!

erinxocon avatar Sep 20 '18 19:09 erinxocon

That's awesome! I'll be able to solely use requests_xml in my code once you add support for that. You might want to check function definition, I believe there might be other arguments other than NSMAP that might be worth adding support for.

Also, I just wanted to say, thanks so much for putting this library together. It's made working with a XML REST API server incredibly simple!

On Thu, Sep 20, 2018 at 2:41 PM erinxocon [email protected] wrote:

Got it, it's something I overlooked when first writing it. I'll work on it this weekend!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/erinxocon/requests-xml/issues/3#issuecomment-423308028, or mute the thread https://github.com/notifications/unsubscribe-auth/ApLcXPXeRVLRrjjLmIOAkjssWfF-akilks5uc-9ggaJpZM4Wjiuf .

-- David Templet Cloud Engineer - Networking +1-713-868-2267 x393

dt-iland avatar Sep 20 '18 21:09 dt-iland