Is the nagging boss still there? XML parsing error for help, 5555 & lt ;? Xml & nbsp; version & quot; 1.0 & quot; & nbsp; encoding & quot; gb18030 & quot; & nbsp ;? & Gt; & nbsp; & lt; xml & gt; invalid characters. & lt; xml & gt; how to ensure that the characters in the tag conform to XML? Are you nagging the boss? XML parsing error for help, 5555
Too many requests.
How can we ensure that the characters in the tag conform to XML? What should I do?
It is really difficult to ensure the accuracy of the XML document, so that it can make php xml parsing function parsing
Is there any XML parser such as regular expressions.
I only want to parse this document. how can I remove/replace these characters? What are these characters?
Thank you.
------ Solution --------------------
This problem should not exist with UTF-8
1. change
Too many requests.
2. Save the xml file in UTF-8 format as a record
3. the php file itself is also saved as UTF-8 in Notepad.
4. add the php file header
Header ('content-type: text/html; charset = utf-8 ');
Welcome to the QQ group for PHP enthusiasts: 30169840
------ Solution --------------------
Hehe, UTF-8 encoding format should be no problem.
However, it is estimated that the landlord does not like this format of UTF-8.
------ Solution --------------------
Let me help you. Looking forward to the answer.
------ Solution --------------------
咔咓吚.
------ Solution --------------------
I do not need to use UTF-8 encoding. I only write php programs. the code is gb2312. at the beginning, I also reported the encoding error. later I changed it to UTF-8, the result is changed to gb2312! Some people say that it seems that we only need to ensure the encoding of several pages is consistent, and the code remains to be verified!
------ Solution --------------------
Jom_ch answered the question.
Only CSDN automatically converts "<" to "<.
咔咓吚 </test> .
------ Solution --------------------
$ Str =" Too many requests. ";
//.....
$ Str = preg_replace ("/[\ x00-\ x08 \ x0b-\ x0c \ x0e-\ x1f]/", '', $ str );
$ Str = htmlspecialchars ($ str );
------ Solution --------------------
The above error is reported.
Htmlspecialchars should be transcoded before being placed In
------ Solution --------------------
Haha, I usually do this:
Function SBC_DBC ($ Str)
{
// ---- Convert all corners into halfwidth ----
$ Queue = Array (
'0' => '0', '1' => '1', '2' => '2', '3' => '3 ', '4' => '4 ',
'5' => '5', '6' => '6', '7' => '7', '8' => '8 ', '9' => '9 ',
'A' => 'A', 'B' => 'B', 'c' => 'C', 'D' => 'D ', 'E' => 'e ',
'F' => 'F', 'G' => 'G', 'H' => 'h', 'I' => 'I ', 'j' => 'J ',
'K' => 'K', 'L' => 'L', 'M' => 'm', 'n' => 'N ', 'o' => 'O ',
'P' => 'P', 'q' => 'Q', 'R' => 'R', 's' =>'s ', 'T' => 'T ',
'U' => 'u', 'V' => 'V', 'W' => 'W', 'x' => 'X ', 'y' => 'y ',
'Z' => 'Z', 'a' => 'A', 'B' => 'B', 'c' => 'C ', 'D' => 'D ',
'E' => 'e', 'F' => 'F', 'G' => 'G', 'H' => 'h ', 'I' => 'I ',