back to expat 

expat.Attr

generated from ../src/mod_expat/attr.cpp

expat.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];
      }
   }
  

Constants



SourceForge.net Logo Support This Project

Table of Contents


Design downloaded from Zeroweb.org: Free website templates, layouts, and tools.