Most voted "simplexml" questions
Simplexml is a PHP extension that allows you to read and manipulate XML in a very simple way, albeit with several restrictions. The main constraint is that an element (tag) can only contain text or other elements, never text together with other elements, as occurs in HTML.
Learn more…15 questions
Sort by count of
-
6
votes2
answers1129
viewsHow to check for errors in an XML
I’m using the function simplexml_load_string to load a dynamic XML, but if there are formatting errors in this XML it only returns me false and I don’t know where the bug is, is it possible for me…
-
3
votes2
answers974
viewsConvert XML to php
I am making a request in php via Curl, and in the reply this returning me an xml, but I can not work with this xml.. REQUISITION: <br> curl =…
-
3
votes2
answers173
viewsSimple XML Reader does not work properly
I’ve been using the Simplexmlreader to try to extract data from the following XML structure: <boutique> <produto num="228122907">…
-
3
votes2
answers124
viewsSimple XML Reader: I can’t convert nodes to HTML or limit the number of items
I’ve been using the Simplexmlreader to parse a gigantic XML structure, which has more than 25mb. My code works normally, but I’m having two problems: I can’t turn the Xpath in HTML. Well, I’ve…
-
2
votes0
answers219
viewsHow to parse XML with namespace and prefix in PHP using Simplexml?
The.xml data file: <?xml version="1.0" encoding="utf-8" ?> <rsp status="ok"> <ArrayOfContact xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"…
-
1
votes0
answers41
viewsDoubt with Parser XML
I have a project that uses Jsoup to parse an xml and I am changing the implementation to Retrofit and Simplexml, but the xml structure varies in the Content block, where can only come a String with…
-
1
votes1
answer210
viewsSimplexml does not return the file data
I’m using simplexml of php to retrieve data from a file xml, but nothing returns. What can it be ? <?php @header('Content-Type: text/html; charset=utf-8'); $xml =…
-
1
votes1
answer1922
viewsTransform array into XML
I’m trying to turn an array into an XML My XML needs to have the following structure <Products> <Product name="TR-501"> <Descricao texto="55.180.198 / 46789771" /> <Detalhes>…
-
1
votes1
answer303
viewsHow to get images in XML CDATA and DESCRIPTION
I have some xml files, and several of them the news images are inside the Description, in one of them the image is inside the CDATA, at the time I return the array to Description does not appear any…
-
1
votes0
answers233
viewssimplexml_load_file does not work with large XML file - Request Time Out
I’m using the simplexml_load_file to parse in an XML document, however, the file has more than 100 Mb and instead of loading only part of the nodes, what is happening is that the whole document is…
-
0
votes2
answers91
views -
0
votes1
answer76
viewsHow to handle a JSON with fasterXML in java?
I have a json that comes from the bank Mongodb, I have to take and manipulate the json using fasterXml. I will have to take the names of the json properties and separate them with dot(.) instead of…
-
0
votes1
answer72
viewsHow to get the first 5 xml records?
<?php $xml = simplexml_load_file('http://g1.globo.com/dynamo/economia/rss2.xml') or die("erro carregar arquivo"); foreach ($xml->channel->item as $noticia) { …
-
0
votes1
answer106
viewsXML Parser in PHP does not work
I am trying to implement an XML PARSE code in PHP, I believe I have set up following the right logic, but it is not working. It works if I use it with an RSS feed, but the RSS Feed doesn’t have the…
-
-1
votes1
answer176
viewsHow to read XML with PHP
Hello I’m starting to learn PHP, and I created an HTML input that receives an XML file that should be read in PHP but I’m having difficulties, I’m using the simplexml_load_file more when I call the…