0

I have the following problem. I have an XML document like this:

<?xml version="1.0" encoding="UTF-8"?>
<transfer xmlns="http://ws.wso2.org/dataservice" username="my_username" password="my_pswd">
    <providerpid>00AB40</providerpid>
    <recipientpid>00AD12</recipientpid>
    <symbol>SMTA1234</symbol>
    <type>SMTA</type>
    <materials>
        <doi>10.0155/1463</doi>
        <doi>10.0155/1464</doi>
    </materials>
</transfer>

As you can see the element have this attribute setted xmlns="http://ws.wso2.org/dataservice"

How can I remove this attribute using simple JavaScript?

AndreaNobili
  • 40,955
  • 107
  • 324
  • 596
  • `elem.removeAttribute('xmlns')` but why would you do that ? – Kaiido Jun 23 '17 at 12:56
  • 2
    https://stackoverflow.com/questions/18766291/removing-xmlns-attributes-added-automatically – selvakumar Jun 23 '17 at 12:57
  • @selvassn in linked question the attribute was added **automatically** because the markup was recognized as being [x]html. While in current case, the attribute is harcoded into the xml. – Kaiido Jun 23 '17 at 13:00

0 Answers0