dom :: XMLAttrTag
dom :: XMLAttrTag :: _attributes
List of attributes in a Tagdom :: XMLAttrTag :: attributes=
List of attributes in a Tagdom :: XMLAttrTag :: attributes_to_map
Attributes as a map (ignoring malformed attributes)dom :: XMLAttrTag :: defaultinit
dom $ XMLAttrTag :: SELF
Type of this instance, automatically specialized in every classdom :: XMLAttrTag :: _attributes
List of attributes in a Tagdom :: XMLAttrTag :: attributes=
List of attributes in a Tagdom :: XMLAttrTag :: attributes_to_map
Attributes as a map (ignoring malformed attributes)core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
dom :: XMLTag :: defaultinit
core :: Object :: defaultinit
dom :: XMLEntity :: defaultinit
dom :: XMLAttrTag :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).dom :: XMLEntity :: set_parent
Optional parent ofself
# Any kind of XML tag with attributes
abstract class XMLAttrTag
super XMLTag
# List of attributes in a Tag
var attributes: Array[XMLAttribute]
end
lib/dom/xml_entities.nit:165,1--171,3
redef class XMLAttrTag
# Attributes as a map (ignoring malformed attributes)
#
# ~~~
# var xml = """
# <student first="Snow" last="Man"/>
# """.to_xml
#
# var attributes = xml["student"].first.as(XMLAttrTag).attributes_to_map
# assert attributes.join(", ", ":") == "first:Snow, last:Man"
# ~~~
fun attributes_to_map: Map[String, String]
do
var m = new Map[String, String]
for a in attributes do
if a isa XMLStringAttr then
m[a.name] = a.value
end
end
return m
end
end
lib/dom/dom.nit:71,1--93,3