AttributeCount property: Incoming Business Interlink class

Description

The AttributeCount property gets the number of attributes within an XML element referenced by a BiDocs object.

This property is read-only.

Example

Here is a set of XML request code.

<?xml version="1.0"?> 
   <postreq> 
      <email>joe_blow@example.com</email> 
      <location scenery="great" density="low" blank="eh?"> 
         <city>San Rafael</city> 
         <state>CA</state> 
         <zip>94522</zip> 
         <country>US</country> 
      </location> 
   </postreq>

Here is the PeopleCode that gets the number of attributes in the location XML element. &count should be 3, for scenery, density, and blank.

Local BIDocs &rootInDoc, &postreqDoc, &locationDoc; 
Local string &blob; 
Local number &count; 
&blob = %Request.GetContentBody(); 
&rootInDoc = GetBiDoc(&blob); 
&postreqDoc = &rootInDoc.GetNode("postreq"); 
&locationDoc = &postreqDoc.GetNode("location"); 
&count = &locationDoc.AttributeCount;