TestPlan XMLNS
Document

XMLNS

by Group Public on Friday June 19 2009 @ 10:39:24 (1/1 Points)

Configuration ↪Reference ✑ Reply ✓ Stick It ✗ Ditch It ⚐ Tag It

XML allows creation of documents spanning several namespaces. These namespaces must be available to the XPath query system otherwise you will be unable to locate the elements.

XMLNS is a special map which allows you to associate prefixes with namespaces.

Also refer to Any XPath lookup in an XML document returns no results.

Mapping

By default there are a few defined namespaces in the property files. They are as follows:

set %XMLNS:soapenv% http://schemas.xmlsoap.org/soap/envelope/
set %XMLNS:xsd% http://www.w3.org/2001/XMLSchema
set %XMLNS:xsi% http://www.w3.org/2001/XMLSchema-instance

This is also the syntax you'd use to add a new namespace. These prefixes are then available for use in XPath, such as //xsi:type/@value.

Mode Limited

This mechanism is limited only to the internally controlled modes such as raw requests, email, direct URL modes, and a few others.

In particular, these prefixes are not available in the browser backends HTMLUnit and Selenium. We have no idea how we would get that working.

© 2008-2010 edA-qa mort-ora-y
Using Persephone and TestPlan
Tag: