Yahoo! UI Library

dataschema  3.3.0pr1

Yahoo! UI Library > dataschema > DataSchema.XML
Search:
 
Filters

static Class DataSchema.XML - extends DataSchema.Base

XML subclass for the DataSchema Utility.

Methods

_getLocationValue

protected static Object _getLocationValue ( field , context )
Get an XPath-specified value for a given field from an XML node or document.
Parameters:
field <String | Object> Field definition.
context <Object> XML node or document to search within.
Returns: Object
Data value or null.

_getXPathResult

protected static Object _getXPathResult ( locator , context , xmldoc )
Fetches the XPath-specified result for a given location in an XML node or document.
Parameters:
locator <String> The XPath location.
context <Object> XML node or document to search within.
xmldoc <Object> XML document to resolve namespace.
Returns: Object
Data collection or null.

_parseField

protected static void _parseField ( field , result , context )
Schema-parsed result field.
Parameters:
field <String | Object> Required. Field definition.
result <Object> Required. Schema parsed data object.
context <Object> Required. XML node or document to search within.

_parseMeta

protected static Object _parseMeta ( xmldoc_in , data_out )
Parses results data according to schema
Parameters:
xmldoc_in <Object> XML document parse.
data_out <Object> In-progress schema-parsed data to update.
Returns: Object
Schema-parsed data.

_parseResult

protected static Object _parseResult ( fields , context )
Schema-parsed result to add to results list.
Parameters:
fields <Array> Required. A collection of field definition.
context <Object> Required. XML node or document to search within.
Returns: Object
Schema-parsed data.

_parseResults

protected static Object _parseResults ( schema , context , data_out )
Schema-parsed list of results from full data
Parameters:
schema <Object> Schema to parse against.
context <Object> XML node or document to parse.
data_out <Object> In-progress schema-parsed data to update.
Returns: Object
Schema-parsed data.

apply

static Object apply ( schema , data )
Applies a given schema to given XML data.
Parameters:
schema <Object> Schema to apply.
data <XMLDoc> XML document.
Returns: Object
Schema-parsed data.

Methods inherited from DataSchema.Base:


Copyright © 2010 Yahoo! Inc. All rights reserved.