expat.Attr
generated from ../src/mod_expat/attr.cppexpat.Attr is used together with onStartElement. expat.Attr gets his properties at run-time. For example:
<tag1 attr="1" attr2="2" />Will result in a expat.Attr object that has attr and attr2 as properties. An easy way of processing all the attributes of a tag is done as follows:
var p = new expat.Parser();
p.onStartElement = function(element, attrs)
{
for(attr in attrs)
{
// attr contains the name of the attribute
var attrValue = attrs[attr];
}
}
© 2002 - 2007 Franky Braem.