0
I have an XML with several records to make an import with PHP. The importing part is ok, but I wanted to make a filter before importing, for example, import only the record that has ID 444, how can I do this?
I thought to download the xml edit and save as a new XML, would that?
XML example:
<Imoveis>
<Imovel>
<Id>123</Id>
</Imovel>
<Imovel>
<Id>444</Id>
</Imovel>
</Imoveis>
I’m using the $xml = new SimpleXMLElement($return)
to download xml, where $return
is the XML value returned from an API.
Isn’t it just a comparison already seen that you need to create a loop on the nodes? As you are doing, it’s nice to put the current code.
– novic
So that’s the comparison I don’t know how to make. The script that makes the import is one that I already use ready, I will see if I can here take only the part that makes the import
– Leandro Marzullo