This method collapses empty tags like <foo></foo> with the short version <foo/> by applying a regular expression. This is especially helpful when dealing with XHTML-documents, as there is an important difference in rendering these tags in the browser.
This method has been added in XML_Util 1.1.0.
string $string - string, in which empty tags should be collapsed
integer $mode - collapse all empty tags (XML_UTIL_COLLAPSE_ALL) or only XHTML tags (XML_UTIL_COLLAPSE_XHTML_ONLY).
Пред. | Начало | След. |
XML_Util::attributesToString() | Уровень выше | XML_Util::createTag() |
HIVE: All information for read only. Please respect copyright! |