Xinf API Reference
Back | Index
class xinf.xml.HasAttribute<T>
extends Instantiator<T>
import xinf.xml.Instantiator

HasAttribute is an Instantiator that matches XML Elements that have a certain attribute.

In contrast to ByAttributeValue, the attribute's value is not regarded.

function new( attributeName:String, cl:Class<T> ) :Void

Create a new HasAttribute Instantiator that matches xml elements that have an attribute with name attributeName, bound to class cl.

For example,
var i = new HasAttribute("name");
matches
<anyNode name="anyValue"/>

Back | Index