Questions tagged as 'simplexml'

1
answer

XML Parser in PHP does not work

I am trying to implement an XML parse code in PHP, I believe I configured it following the right logic, but it is not working. It works if I use it with an RSS feed, however the RSS Feed does not have the links of the images. The final goal is t...
asked by 27.05.2017 / 06:23
1
answer

How to get the first 5 records of xml?

<?php $xml = simplexml_load_file('http://g1.globo.com/dynamo/economia/rss2.xml') or die("erro carregar arquivo"); foreach ($xml->channel->item as $noticia) { $n...
asked by 22.02.2017 / 20:43
1
answer

How to manipulate a JSON with fasterXML in java?

I have a json that comes from the MongoDB bank, I have to get and manipulate json using fasterXml. I will have to get the json properties names and separate them with period (.) Instead of comma (,) Type like this: "type" : "object", "id"...
asked by 01.02.2016 / 20:03
2
answers

Loop between an existing loop SimpleXML Photo Tag

How do I convert this (which only brings me the first photo) //corrige foto $enderecofoto = $xml->imovel[$i]->fotos->foto; $nomeeextensao = preg_replace("(^.*\/(.*)\$)", "$1$2",$enderecofoto); $removenomeeextensao = str_replace($nomee...
asked by 25.08.2015 / 21:50