Most voted "php-domdocument" questions
In PHP, it refers to the Domdocument class, which represents an entire HTML or XML document. It serves as the root of the document tree. If the question isn’t about PHP Domdocument, don’t use this tag, even if you are using PHP Domdocument in your project.
Learn more…14 questions
Sort by count of
-
5
votes5
answers446
viewsHow can I capture a favicon from a site via PHP?
I upload an external content from a website and then import it to the DOMDocument. Currently, I can capture tag information title easily. I do so: $dom = new DOMDocument();…
-
3
votes2
answers950
viewsChange XML tags value
I’m having a hard time. I’m unable to scan the XML file and change the values of the tags I need, they are NOTA and SERIE. I have to replace these tags with new values, someone knows how to do it ?…
-
2
votes2
answers749
viewsCapture div by class
I am trying to capture a div from its class but did not succeed, notice: I try to capture the div with the class class='m-definicao-conteudo' of the site that I inform to Curl, but returns me this…
-
2
votes0
answers45
viewsPHP syntax Highlighter - DOM object does not update HTML
I’ve been developing a code to do syntax Highlighting, but the code is failing to update HTML. The code is extensive, and unfortunately all of it is necessary. I have a main file called…
-
2
votes3
answers9219
viewsjson_encode returning "Malformed UTF-8 characters, possibly incorrectly encoded"
I’m using the Laravel 3 in a given system. Sometimes I’m having a problem with the json_encode, returning false in some cases. In this code, I upload an external page and, with the DomDocument, make…
-
2
votes3
answers2181
viewsError "class Domdocument not found" when trying to run Phpunit
When trying to turn the command phpunit on the command line, I received the following error: Class 'Domdocument' not found This wasn’t happening before. I remember having removed and installed PHP…
-
1
votes1
answer117
viewsHow to define the output format of an XML in PHP?
Good afternoon! I’m developing a webservice in which I will not disclose the name in which there is a method that accepts XML in the following mode: <exemplo> <exemplo></exemplo>…
-
0
votes3
answers76
viewsHow to get only strings containing the word "x"
I’m picking up through a parser with PHP DOM all the links on a page. I need to pick up only the links that contain the word "buy-Toyota" I was using the following code, but suddenly it stopped…
-
0
votes1
answer550
viewsProblems with file_get_contents and Domdocument
I’m trying to download the content of a site, but is giving this Warning: `Domdocument::loadHTML(): Unexpected end tag : tr in Entity And it’s spelling out several lines. I’m also not getting the…
-
0
votes1
answer233
viewsERROR = Warning: Domdocument::loadHTML(): Empty string supplied as input
Good morning, I’m making the following mistake: Warning: Domdocument::loadHTML(): Empty string supplied as input. This error occurs on my free server, the strange thing is that locally everything…
-
0
votes0
answers146
viewsHow to correctly display an XML that has blank cells in PHP?
Good afternoon, everyone. I followed a video classroom how to display XML data in PHP, and everything worked out, the result was displayed correctly, but if a cell is empty it plays the value of the…
-
0
votes1
answer32
viewsHow to know which link class to select with php
I’m creating a website that has information from multiple vendors accessed by an administrator. To display vendor data, I have their names in a table by selecting them from a Mysql database. Taking…
-
0
votes1
answer88
viewsHelp to transform a for each ( from a php file_get_contents ) into Json Encode
to performing a file_get_contents php on a site, ai shows all teams of this site, in the for each loop it shows me all the time ( that are between the file tags ), but wanted to turn all these teams…
-
0
votes1
answer27
viewsDomdocument search XML nested tag
I am searching the XML data below to save in PHP variables for future processing. The XML excerpt below is what I am working on: Inside the "notas_fiscais", I was able to extract the data correctly…