|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30746 simplexml_load_file fails if the data contains the '&' or '<' or '>' character
Submitted: 2004-11-10 14:13 UTC Modified: 2004-11-10 14:25 UTC
From: manoj_smartsoft at rediffmail dot com Assigned:
Status: Not a bug Package: *XML functions
PHP Version: 5.0.2 OS: Windows-XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: manoj_smartsoft at rediffmail dot com
New email:
PHP Version: OS:


 [2004-11-10 14:13 UTC] manoj_smartsoft at rediffmail dot com
If the XML file conatinx &,< or > in the data field, then the simplexml_load_file fails

Reproduce code:
// * bug_file.xml : START * //
<?xml version='1.0' standalone='yes'?>

// * bug_file.xml : END * //

$xml = simplexml_load_file("bug_file.xml");

echo $xml->couple[0]->name; // "So this language. It's ike..."

Expected result:
This should give me the following result


Actual result:
The actual result is that, the function returns error.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-10 14:25 UTC] manoj_smartsoft at rediffmail dot com
To avoid this use the ascii values

go to
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 22:01:30 2024 UTC