php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #42981 Schema validation support for SimpleXML
Submitted: 2007-10-15 18:28 UTC Modified: 2007-10-15 19:33 UTC
From: freddie at witherden dot org Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.2.4 OS: Any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: freddie at witherden dot org
New email:
PHP Version: OS:

 

 [2007-10-15 18:28 UTC] freddie at witherden dot org
Description:
------------
I would be nice if it were possible to have SimpleXML validate a 
document against a schema when you create a new instance of it (optional 
parameter?).

Currently one has to use the DOM, then assuming it is valid convert it 
to a SimpleXML document. Often if one just wants to read/process a 
document SimpleXML is a much nicer solution than the full-blown DOM.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-15 19:33 UTC] johannes@php.net
SimpleXML is a simple DOM-wrapper, therefore you can simply convert a SimpleXML document to a DOMDocument without any costs (and vice versa, too), see the documentation for more.
 [2007-10-15 19:33 UTC] johannes@php.net
.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 20:01:32 2025 UTC