In the documentation I'm looking at for a file upload, it needs this specific tag at the beginning of the xml file:
<oclcPersonas xmlns="http://worldcat.org/xmlschemas/IDMPersonas-2.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://worldcat.org/xmlschemas/IDMPersonas-2.2 IDMPersonas-2.2.xsd">
I'm trying to use the lxml.etree library to figure this out.
Many of the examples I've seen have a initial level of namespace for attributes that would cover the xmlns:xsi portion using this:
namespace_map = {
None: persona_namespace,
'xsi': "http://www.w3.org/2001/XMLSchema-instance"}
but 2 questions arise from the second portion xsi:schemaLocation
1) How would I accomplish a secondary level of namespace using lxml?
2) How do I allow the namespaces to contain a space without receiving an error (http://worldcat.org/xmlschemas/IDMPersonas-2.2 IDMPersonas-2.2.xsd)