php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #72725 Document what are allowed characters for XMLWriter::startElement's name
Submitted: 2016-08-01 12:43 UTC Modified: 2016-08-01 13:24 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: bobik at ibobik dot cz Assigned:
Status: Open Package: XML Writer
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bobik at ibobik dot cz
New email:
PHP Version: OS:

 

 [2016-08-01 12:43 UTC] bobik at ibobik dot cz
Description:
------------
This code will return nothing because of brackets characters in the tag name:

writer->startElement("tag-(with)-brackets");

On the http://php.net/manual/en/function.xmlwriter-start-element.php should be documented what characters should not be there.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-01 13:24 UTC] cmb@php.net
From reading the description of $name ("The element name."), I
would assume that any valid XML Name as specified by the
respective XML standard[1] is allowed.

Note also that XMLWriter::startElement() is supposed to raise a
warning, if an invalid $name is given, see
<https://3v4l.org/OurBC>.

[1] <https://www.w3.org/TR/REC-xml/#NT-Name> for XML 1.0
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 08:01:28 2024 UTC