Whitebeam Object Definition

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Whitebeam Object Definition

Method Description

XmlTag.findId()

Search for XML tags with a specific ID.

Syntax

XmlTag.XmlTagArray = XmlTag.findId(tagName)

Parameters

The 'XmlTag.findId' method takes 1 parameter:

Name Type/Value Range/Length Description
tagNamestring  Required. The string ID XML tags for which to search.

Results

The 'XmlTag.findId' method returns an array of structure:

Type/Value Range/Length Description
struct XmlTag.XmlTag see definition Array of XmlTag objects.

Remarks

Search an XML subtree from the selected element for all tags for which the string parameter matches the value of their ID parameter. The 'id' can have been set using either tag.mark() or the rb:id attribure in Whitebeam Presentation Pages.

Example

Consider the following call:

var tags = parser.root.findId("kodak");

Applied to the following document:

<doc>
   <product name="camera" rb:id="kodak">
      <price value="100" units='UKP">
   </price>
   <product name="video">
      <price value="249.95" units='UKP">
   </price>
</doc>

The call 'find' call will yield a JavaScript array containing a single element that reference the first product element.

Whitebeam release 1.3.36
(loadtime : 12ms)