-
Notifications
You must be signed in to change notification settings - Fork 0
Phoenix35/xLib
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
************************************************************************
* Copyright 2010, 2011 Phoenix35, Kapoeira. *
* *
* This file is part of xLib. *
* *
* xLib is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation version 3 of the License. *
* xLib is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
************************************************************************
** Version 0.5.2
xLib is a Javascript library which makes XPath a lot easier.
HOW-TO:
var a = xLib.evaluate(STRING xpathExpression [, XPathResult.CONSTANT or NUMBER resultType [, FUNCTION namespaceResolver]]); // Returns the XPath Object matching xpathExpression of the type resultType (ANY_TYPE by default)
a.value = numberValue, stringValue or booleanValue (depends on resultType)
a.node = a.singleNodeValue
a.nodes(n) = function returning the n'th node of the XPath Object (equivalent of snapshotItem(n) or iterateNext() 'n' times)
a.nodes(n).attribute(x [, y]) = if only x is provided, return getAttribute(x), otherwise return setAttribute(x, y)About
xLib project ; © Obivous / Phoenix35
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published