Class Index | File Index

Classes


Class xrx.pilot


Defined in: pilot.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
xrx.pilot(xml)
Constructs a new pilot.
Method Summary
Method Attributes Method Name and Description
 
attribute(context, target, opt_update)
Get the location and optionally update a xrx.token.Attribute.
 
attributes(context, target, opt_update)
Get or update an array of xrx.token.Attribute.
 
attrName(context, target, opt_update)
Get the location and optionally update a xrx.token.AttrName.
 
attrValue(context, target, opt_update)
Get the location and optionally update a xrx.token.AttrValue.
 
backward(target, target)
Backward tree traversing.
 
Returns the path lastly used to traverse the XML tree (for debugging only).
 
emptyTag(context, target, opt_update)
 
endTag(context, target, opt_update)
 
forward(target, target)
Forward tree traversing.
 
location(opt_context, target)
Returns the location of a token.
 
notTag(context, target, opt_update)
Get the location and optionally update a xrx.token.NotTag.
 
path(context, tag)
 
startTag(context, target, opt_update)
 
tagName(context, target, opt_update)
Get the location and optionally update a xrx.token.TagName.
 
update(context, target, update)
Updates a token and returns its location.
 
xml(token)
Returns a token string or the content of the XML stream.
Class Detail
xrx.pilot(xml)
Constructs a new pilot. A pilot is able to traverse a XML tree in forward and backward direction.
Parameters:
{!string} xml
A XML string.
Method Detail
{!xrx.token.Attribute} attribute(context, target, opt_update)
Get the location and optionally update a xrx.token.Attribute.
Parameters:
{?} context
{!xrx.token.Attribute} target
The attribute token.
{?string} opt_update
The new attribute.
Returns:
{!xrx.token.Attribute}

{!Array.} attributes(context, target, opt_update)
Get or update an array of xrx.token.Attribute.
Parameters:
{?} context
{!xrx.token.StartEmptyTag} target
The start-empty tag.
{?Array.} opt_update
Array of new attribute tokens.
Returns:
{!Array.}

{!xrx.token.AttrName} attrName(context, target, opt_update)
Get the location and optionally update a xrx.token.AttrName.
Parameters:
{?} context
{!xrx.token.AttrName} target
The attribute-name token.
{?string} opt_update
The new attribute-name.
Returns:
{!xrx.token.AttrName}

{!xrx.token.AttrValue} attrValue(context, target, opt_update)
Get the location and optionally update a xrx.token.AttrValue.
Parameters:
{?} context
{!xrx.token.AttrValue} target
The attribute-value token.
{?string} opt_update
The new attribute-value.
Returns:
{!xrx.token.AttrValue}

backward(target, target)
Backward tree traversing.
Parameters:
{?} target
The target token.
target

{?} currentPath()
Returns the path lastly used to traverse the XML tree (for debugging only).
Returns:
{?}

emptyTag(context, target, opt_update)
Parameters:
context
target
opt_update

endTag(context, target, opt_update)
Parameters:
context
target
opt_update

forward(target, target)
Forward tree traversing.
Parameters:
{?} target
The target token.
target

{?} location(opt_context, target)
Returns the location of a token.
Parameters:
opt_context
target
Returns:
{?}

{!xrx.token.NotTag} notTag(context, target, opt_update)
Get the location and optionally update a xrx.token.NotTag.
Parameters:
{?} context
{!xrx.token.NotTag} target
The not-tag token.
{?string} opt_update
The new not-tag.
Returns:
{!xrx.token.NotTag}

path(context, tag)
Parameters:
context
tag

startTag(context, target, opt_update)
Parameters:
context
target
opt_update

{!xrx.token.TagName} tagName(context, target, opt_update)
Get the location and optionally update a xrx.token.TagName.
Parameters:
{?} context
{(!xrx.token.StartTag|!xrx.token.EndTag|!xrx.token.EmptyTag |!xrx.token.StartEmptyTag|!xrx.token.Tag)} target
The tag to which the tag-name belongs.
{?string} opt_update
The new tag-name.
Returns:
{!xrx.token.TagName}

update(context, target, update)
Updates a token and returns its location.
Parameters:
context
target
update

{!string} xml(token)
Returns a token string or the content of the XML stream.
Parameters:
token
Returns:
{!string}

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 17 2013 17:08:43 GMT+0200 (MESZ)