XML Namespace

This page is for data modellers who are transferring XML data via HTTP.

Overview

Use the XML namespace properties to specify the namespaces defined in an XML response which can then be used by the XPath. PhixFlow needs this information because an XML namespace ensures the names, elements and attributes in the file are unique. An XML instance may contain element or attribute names from more than one XML vocabulary. If each vocabulary is given a namespace, the ambiguity between identically named elements or attributes can be resolved. 

This property tab is not available from the repository. It opens from the XML Namespaces section in:

Property Pane Toolbar

For information about the toolbar options, see the Common Properties page, Toolbars and Controls section.

 Properties Tab

Parent Details

If this item is within or belongs to another, its parent name is shown here. See the Parent Details section on the Common Properties page for more details.

Basic Settings

FieldDescriptionExample Value
Prefix

Enter a name for the XML namespace. The name must match the name you use in XPath expressions to extract data from the XML response.

Note: The Prefix used here does not need to match the prefix used in the XML document, only the prefix used for the XPath expression.

Example 1. Specify the name soapenv for the XML response: 

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

Example 2. Specify the name home if:

  • The default namespace is  xmlns="urn:xmlns:company-com:message" 
  • To use the alias home in XPath expressions, you can enter home in this field. 

See HTTP Collectors for examples of using namespaces in XPath expressions to extract data from XML responses.

default
URI

Enter the value of the XML namespace. For example:

http://schemas.xmlsoap.org/soap/envelope/
http://connector.company.com/pf-stocks-updated

 Audit Tab

Audit Summary

See the Common Properties page, Audit Summary section.

Using Default Namespaces

Documents can use:

  • a namespace to refer to an element
  • a default namespace to refer to any element in an XPath expression that does not explicitly use a namespace.

If a document uses a default namespace, you must define an XML namespace name for it. The following example shows how a default namespace defined in an XML response is handled.

XML Document

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns="urn:xmlns:company-com:message"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xmlns:pf="urn:phixflow.message.com">
	<soapenv:Body>
		<queryResponse>
			<result xsi:type="QueryResult">
				<done>true</done>
				<queryLocator xsi:nil="true"/>
				<record xsi:type="pf:sObject">
					<pf:type>Account</pf:type>
					<pf:Name>Company1</pf:Name>
					<pf:CreatedDate>2013-10-31T11:26:21.000Z</pf:CreatedDate>
				</record>
				<record xsi:type="pf:sObject">
					<pf:type>Account</pf:type>
					<pf:Name>Company2</pf:Name>
					<pf:CreatedDate>2013-10-31T11:26:21.000Z</pf:CreatedDate>
				</record>
				<size>2</size>
			</result>
		</queryResponse>
	</soapenv:Body>
</soapenv:Envelope>

In this document the default namespace is "urn:xmlns:company-com:message"To extract all the record elements from the document, in the file or HTTP collector, set the:

  1. XML namespace to have a default namespace, for example def
  2. Response section → XPath field to extract the records from the default namespace: //def:record.

More commonly, you will want to extract an element from a record to add it to the table that reads from this collector. In this case, use the other namespaces, such as xmlns:pf="urn:phixflow.message.com". For example, to write the value from the element Name within each record element to a attribute, use the attribute expression in.sf$Name.



Sections on this page

Learn More

For links to all pages in this topic, see Analysis Models for Batch Processing Data.


Terminology changes in progress

As part of the redesign of PhixFlow, we are changing the following terms:

dashboard → screen   
stream → table
stream attributes → attributes
stream item → record
stream set → recordset
stream view → view
stream item action → record-action 
stream action → table-action
driver class → database driver