Extracted from Pike v7.4 release 117 at 2004-07-26.
pike.ida.liu.se
[Top]
predef::
Parser
Parser.HTML

Method Parser.HTML()->tag_args()


Method tag_args

array tag()
string tag_name()
mapping(string:mixed) tag_args()
string tag_content()
array tag(mixed default_value)
string tag_args(mixed default_value)

Description

These give parsed information about the current thing being parsed, e.g. the current tag, container or entity. They return zero if they're not applicable.

tag_name gives the name of the current tag. If used from an entity callback, it gives the string inside the entity.

tag_args gives the arguments of the current tag, parsed to a convenient mapping consisting of key:value pairs. If the current thing isn't a tag, it gives zero. default_value is used for arguments which have no value in the tag. If default_value isn't given, the value is set to the same string as the key.

tag_content gives the content of the current tag, if it's a container or quote tag.

tag() gives the equivalent of ({tag_name(),tag_args(), tag_content()}).