3.0 beta 2

Using Namespaces in XML Data Model

I'm getting the following error when trying to reference an xml element which has a namespace prefix:

Error: uncaught exception: [Exception... "An attempt was made to create or change an object in a way which is incorrect with regard to namespaces" code: "14" nsresult: "0x8053000e (NS_ERROR_DOM_NAMESPACE_ERR)" location: "http://localhost:8080/js/grid-runtime/lib/grid.js Line: 27"]

Here's the javascript code that defines the Xpath for the columns:

// set columns XPath
table.setColumns(["title", "link", "description", "ebay:startdate", "ebay:enddate", "ebay:buyitnowprice", "guid"]);

How can I reference an element with a namespace?

December 21,

This XPath expression seems to work in Firefox:


But Internet Explorer (version 6) displays this error:

Error: Unknown method


Any ideas?
December 21,
there is an example in /examples/grid/xml-array of records.htm
Basically you have to declare your namespace with setNamespace() method -

table.setNamespace("co", "http://tempuri.org/");

and then you can use namespace is XPath -

table.setColumns(["co:ticker", "co:name", "co:marketcap"]);
Alex (ActiveWidgets)
December 21,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.