Removing XML namespace via php

0

I have an XML with namespace that I can not read via PHP.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns1:informationTable 
xmlns:ns1="http://www.sec.gov/edgar/document/thirteenf/informationtable">
<ns1:infoTable>
    <ns1:nameOfIssuer>Adobe Inc</ns1:nameOfIssuer>
    <ns1:titleOfClass>COM</ns1:titleOfClass>
    <ns1:cusip>00724F101</ns1:cusip>
    <ns1:value>115954</ns1:value>
    <ns1:shrsOrPrnAmt>
        <ns1:sshPrnamt>429538</ns1:sshPrnamt>
        <ns1:sshPrnamtType>SH</ns1:sshPrnamtType>
    </ns1:shrsOrPrnAmt>
    <ns1:investmentDiscretion>SOLE</ns1:investmentDiscretion>
    <ns1:otherManager>0</ns1:otherManager>
    <ns1:votingAuthority>
        <ns1:Sole>359183</ns1:Sole>
        <ns1:Shared>0</ns1:Shared>
        <ns1:None>70355</ns1:None>
    </ns1:votingAuthority>
</ns1:infoTable>
</ns1:informationTable>'

The code I'm using to try to read this xml is:

$arquivo_xml = simplexml_load_string($R[2]);
$arquivo_xml = json_encode($arquivo_xml);
$arquivo_xml = json_decode($arquivo_xml,TRUE);

This code works if it has no namespace, but in this xml case above, it does not work. I wanted to remove the namespaces for whether or not it comes with us, so I can use the same code for both cases. I have already looked into questions with similar topics, but I could not find a solution in this case. Note: The pasted xml is inside this variable $ R [2].

Could someone help me? Thank you !!

    
asked by anonymous 28.11.2018 / 15:30

0 answers