| Anonymous | Login | Signup for a new account | 10-29-2025 18:21 PDT |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
| 0006004 | [Quercus] | minor | always | 05-15-16 08:38 | 07-03-16 13:07 | ||||
| Reporter | ebo | View Status | public | ||||||
| Assigned To | nam | ||||||||
| Priority | normal | Resolution | not fixable | ||||||
| Status | closed | Product Version | |||||||
| Summary | 0006004: SimpleXML reorders attributes | ||||||||
| Description |
When adding attributes with SimpleXML, the attributes get reordered in alphabetic order. This causes issues when comparing XML documents. The following code snippet: $xml=simplexml_load_string('<?xml version="1.0" encoding="utf-8"?><test/>'); $child=$xml->addChild('foo', 'bar'); $child->addAttribute('xyz', 'first'); $child->addAttribute('abc', 'second'); echo ' ' . htmlentities($xml->asXML()) . ''; Outputs: <?xml version="1.0"?> <test><foo abc="second" xyz="first">bar</foo></test> |
||||||||
| Additional Information | |||||||||
| Attached Files | |||||||||
|
|
|||||||||
| Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed. 26 unique queries executed. |