From 2f53c4a3ad3b7a903ffd2a9308cb141573124880 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 12 Feb 2014 11:31:04 +0100 Subject: [PATCH] Add ol.format.XLink --- src/ol/format/xlinkformat.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/ol/format/xlinkformat.js diff --git a/src/ol/format/xlinkformat.js b/src/ol/format/xlinkformat.js new file mode 100644 index 0000000000..a01b61ec7e --- /dev/null +++ b/src/ol/format/xlinkformat.js @@ -0,0 +1,17 @@ +goog.provide('ol.format.XLink'); + + +/** + * @const + * @type {string} + */ +ol.format.XLink.NAMESPACE_URI = 'http://www.w3.org/1999/xlink'; + + +/** + * @param {Node} node Node. + * @return {boolean|undefined} Boolean. + */ +ol.format.XLink.readHref = function(node) { + return node.getAttributeNS(ol.format.XLink.NAMESPACE_URI, 'href'); +};