How to apply a filter in XML to import the records using PHP?

0

I have an XML with several records to do an import with PHP. The import part is ok, but I wanted to do a filter before importing, for example, just importing the record that has ID 444, how can I do that?

I thought of downloading the xml edit and saving as a new XML, would that be?

XML Example:

<Imoveis>
 <Imovel>
  <Id>123</Id>
 </Imovel>
 <Imovel>
  <Id>444</Id>
 </Imovel>
</Imoveis>

I'm using $xml = new SimpleXMLElement($return) to download xml, where $return is the value of the XML returned from an API.

    
asked by anonymous 19.11.2018 / 14:53

0 answers