We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can i customize the default serialization of an empty string attribute ? For example:
/** * @XmlElement(cdata=false) * @var string */ protected $name = '';
istead of <name /> i want <name></name> in the xml file.
<name />
<name></name>
The text was updated successfully, but these errors were encountered:
in xml there is no difference between <name /> i want <name></name>.
any special reason to rely on it?
currently is not supported by jms.
(see LIBXML_NOEMPTYTAG on http://php.net/manual/en/domdocument.savexml.php )
LIBXML_NOEMPTYTAG
Sorry, something went wrong.
Actually i'm working on an application that requires specifically the second form and i don't know how to do that. Any idea ?
$dom = new DOMDocument(); $dom->loadXML($xml); echo $dom->saveXML(null, LIBXML_NOEMPTYTAG);
Ok thanks @goetas
No branches or pull requests
How can i customize the default serialization of an empty string attribute ? For example:
istead of
<name />
i want<name></name>
in the xml file.The text was updated successfully, but these errors were encountered: