Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Insert excerpt_Banners_Bannersnameanalysisnopaneltrue

This page is for a data modeller who needs to load data from an external source via HTTP.

Overview

An HTTP collector reads data from a HTTP Datasource. The collector defines how the data needed from the datasource is extracted to be used in PhixFlow.

Insert excerpt_http_newlines_http_newlinesnopaneltrue

To add a new HTTP collector to an analysis model:

  • Go to the model's toolbar → Create group.
  • Click Insert excerpt_http_httpnopaneltrue to expand the menu.Drag a  Insert excerpt_http_collector_http_collectornopaneltrue onto the analysis model.

    To add an existing HTTP collector to an analysis model, in the model diagram toolbar:

  • Go to the model toolbar → List group.
  • Click Insert excerpt_http_httpnopaneltrue to expand the menu.Click  Insert excerpt_http_collector_http_collectornopaneltrue to open the list of available collectors.
  • Drag an HTTP collector into the analysis model.
  • Table Values in a HTTP Collector

    To drive the lookups made by a HTTP collector from a table, the two must be connected using a lookup pipe. For example, a URL for a server can either be captured or calculated in an attribute called "ServerURL". The URL is then passed via a lookup pike to the HTTP collector to be used in its URL Expression

    If the pipe is called in, here is how the URL Expression would be written on the HTTP collector: 
      {substring(in.ServerUrl,9)}

    Insert excerpt_property_tabs_property_tabsnamebasic-hnopaneltrue Insert excerpt_parent_parentnopaneltrue

    Basic Settings

    FieldDescriptionNameEnter the name of the HTTP collector.Enabled Insert excerpt_check_box_tick_check_box_ticknopaneltrue when the configuration is complete and the collector is ready to be used.HTTP DatasourceSelect the HTTP datasource that this collector will collect from. For how to add a new one, see HTTP Datasource Properties.  To select from a list, click  Insert excerpt_http_datasource_http_datasourcenamelistnopaneltrue.HTTP Request Method
    Excerpt

    Select one of the following HTTP methods to use for the request:

    • GET or POST
    • GET
    • POST
    • DELETE
    • OPTIONS
    • PUT
    • PATCH

    We recommend that you select a method but if you do not, PhixFlow uses GET or POST by default. If the Send Message → Statement Expression:

    • evaluates to null or empty string, PhixFlow uses GET
    • is not empty, PhixFlow uses POST.

    For information, see the w3schools page about HTTP methods.

    IconEnter the name of an icon to display in controls when this HTTP collector is used.Timeout (secs)The number of seconds to wait for a response from the corresponding HTTP datasource before a timeout is recorded.Allow Non-Scheduled CollectionIf this is turned on, then the collector will run as part of any ad-hoc Analysis Engine run which requires this data. If not, it will only run as part of a scheduled Task Plan under the Analysis Engine.Datasource Instance Expression

    The datasource to which this collector is connected may list multiple instances from which the data may be accessed. Each HTTP datasource instance is identified by a unique string. This expression should evaluate to a string which allows the collector to determine the specific instance to use. If the expression is blank then the collector will assume that there is only one instance and will use that one by default. If there is more than one instance and no expression is provided here then an error will be thrown during analysis since the collector will be unable to determine which source to use.

    See also  HTTP datasource instance and Expressions and PhixScripts.

    Send Message

    Define details of the HTTP request sent to the HTTP Datasource to get the data required.

    FieldDescriptionURL Expression

    The URL to be used, without the leading http:// prefix. The URL may contain embedded expressions within { }. If this field is blank, the URL field on the httpDatasourceInstance is used directly.

    For Example, this expression adds to the base URL provided by the HTTP datasource instance:
        {_url}/sub1/sub2?param1=3

    The HTTP Collector will follow any HTTP redirections and return the final response.

    See also HTTP datasource instance and Expressions and PhixScripts.

    Statement ExpressionAn expression to generate the data that will be sent by the exporter to the datasource. For Example

    <?xml version ="1.0"?> <!DOCTYPE CORPORATE DASHBOARD "corpDash.dtd"> <results user="%USERNAME%" password="%PASSWORD%"> <monthlyTotals region={'"' + Region + '"'} division={'"' + Division + '"'}> <totalBilled>{'"' + TotalBilled + '"'}<\totalBilled> <totalCollected>{'"' + TotalCollected + '"'}<\totalCollected> <monthlyTotals> <\results>

    The username and password for the HTTP Datasource Instance are available as %USERNAME% and %PASSWORD%.

    The data will be encoded using the charset parameter specified by the Content-Type Header if one is present. If no Content-Type Header is set then ISO-8859-1 will be used. If the Content-Type header is set, but does not specify a charset then PhixFlow will use a default character set dependant on the content type.

    HTTP Headers

    This section has a toolbar with standard buttonsThe grid contains a list of the HTTP headers defined for this collector. To add a HTTP header to the list, click  Insert excerpt_new_newnopaneltrue. PhixFlow opens a new HTTP Header Properties properties tab. To remove a HTTP header, use the Insert excerpt_delete_deletenopaneltrue in the toolbar.

    Some headers will be set to default values if not provided. Automatically added headers may not appear in the debug log. The Content-Length header will be added to all requests and cannot be overridden by providing a value.

    Response

    Define the data response type/format that will be returned:

    • HTML: response type allows an XPath Expression to be specified in order to retrieve just specified sections of the data into XML structures.
    • XML: response type allows an XPath Expression to be specified in order to retrieve just specified sections of the data into XML structures. XML response types also support XML namespaces. The Xml Namspaces tab will be available when this response type is chosen.
    • String: response type will return the full data as a string value.

    Please see Response Examples for how the returned data can be used and evaluated in the corresponding stream attribute expressions.

    FieldDescriptionReturn  TypeThe type of the expected response : XML/HTTP/StringXPath

    The XPath expression used to resolve or filter the data that comes back in XML or HTML format.

    Note

    Xpath namespaces syntax can only be used for XML response types.

    XML Namespaces

    This section has a toolbar with standard buttonsThe grid contains a list of the namespaces defined in an XML response.

    To add a namespace to the list, click  Insert excerpt_new_newnopaneltrue. PhixFlow opens a new XML Namespace Properties panel. To remove a namespace, use the Insert excerpt_delete_deletenopaneltrue in the toolbar

    Insert excerpt
    _Banners
    _Banners
    nameanalysis
    nopaneltrue


    This page is for a data modeller who needs to load data from an external source via HTTP.

    Overview

    An HTTP collector reads data from a HTTP Datasource. The collector defines how the data needed from the datasource is extracted to be used in PhixFlow.

    Insert excerpt
    _http_newlines
    _http_newlines
    nopaneltrue

    To add a new HTTP collector to an analysis model:

    1. Go to the model's toolbar → Create group.
    2. Click
      Insert excerpt
      _http
      _http
      nopaneltrue
       to expand the menu.
    3. Drag a 
      Insert excerpt
      _http_collector
      _http_collector
      nopaneltrue
       onto the analysis model.

    To add an existing HTTP collector to an analysis model, in the model diagram toolbar:

    1. Go to the model toolbar → List group.
    2. Click
      Insert excerpt
      _http
      _http
      nopaneltrue
       to expand the menu.
    3. Click 
      Insert excerpt
      _http_collector
      _http_collector
      nopaneltrue
       to open the list of available collectors.
    4. Drag an HTTP collector into the analysis model.

    Table Values in a HTTP Collector

    To drive the lookups made by a HTTP collector from a table, the two must be connected using a lookup pipe. For example, a URL for a server can either be captured or calculated in an attribute called "ServerURL". The URL is then passed via a lookup pike to the HTTP collector to be used in its URL Expression

    If the pipe is called in, here is how the URL Expression would be written on the HTTP collector: 
      {substring(in.ServerUrl,9)}

    Insert excerpt
    _property_tabs
    _property_tabs
    namebasic-h
    nopaneltrue

    Insert excerpt
    _parent
    _parent
    nopaneltrue

    Basic Settings

    FieldDescription
    NameEnter the name of the HTTP collector.
    Enabled
    Insert excerpt
    _check_box_tick
    _check_box_tick
    nopaneltrue
     when the configuration is complete and the collector is ready to be used.

    Send Message

    Define details of the HTTP request sent to the HTTP Datasource to get the data required.

    FieldDescription
    HTTP Request Method


    Excerpt

    Select one of the following HTTP methods to use for the request:

    • GET or POST
    • GET
    • POST
    • DELETE
    • OPTIONS
    • PUT
    • PATCH

    We recommend that you select a method but if you do not, PhixFlow uses GET or POST by default. If the Send Message → Statement Expression:

    • evaluates to null or empty string, PhixFlow uses GET
    • is not empty, PhixFlow uses POST.

    For information, see the w3schools page about HTTP methods.


    URL Expression

    The URL to be used, without the leading http:// prefix. The URL may contain embedded expressions within { }. If this field is blank, the URL field on the httpDatasourceInstance is used directly.

    For Example, this expression adds to the base URL provided by the HTTP datasource instance:
        {_url}/sub1/sub2?param1=3

    The HTTP Collector will follow any HTTP redirections and return the final response.

    See also HTTP datasource instance and Expressions and PhixScripts.

    Statement ExpressionAn expression to generate the data that will be sent by the exporter to the datasource. For Example

    <?xml version ="1.0"?> <!DOCTYPE CORPORATE DASHBOARD "corpDash.dtd"> <results user="%USERNAME%" password="%PASSWORD%"> <monthlyTotals region={'"' + Region + '"'} division={'"' + Division + '"'}> <totalBilled>{'"' + TotalBilled + '"'}<\totalBilled> <totalCollected>{'"' + TotalCollected + '"'}<\totalCollected> <monthlyTotals> <\results>

    The username and password for the HTTP Datasource Instance are available as %USERNAME% and %PASSWORD%.

    The data will be encoded using the charset parameter specified by the Content-Type Header if one is present. If no Content-Type Header is set then ISO-8859-1 will be used. If the Content-Type header is set, but does not specify a charset then PhixFlow will use a default character set dependant on the content type.

    HTTP Headers

    This section has a toolbar with standard buttonsThe grid contains a list of the HTTP headers defined for this collector. To add a HTTP header to the list, click 

    Insert excerpt
    _new
    _new
    nopaneltrue
    . PhixFlow opens a new HTTP Header Properties properties tab. To remove a HTTP header, use the
    Insert excerpt
    _delete
    _delete
    nopaneltrue
     in the toolbar.

    Some headers will be set to default values if not provided. Automatically added headers may not appear in the debug log. The Content-Length header will be added to all requests and cannot be overridden by providing a value.

    Response

    Define the data response type/format that will be returned:

    • HTML: response type allows an XPath Expression to be specified in order to retrieve just specified sections of the data into XML structures.
    • XML: response type allows an XPath Expression to be specified in order to retrieve just specified sections of the data into XML structures. XML response types also support XML namespaces. The Xml Namspaces tab will be available when this response type is chosen.
    • String: response type will return the full data as a string value.

    Please see Response Examples for how the returned data can be used and evaluated in the corresponding stream attribute expressions.

    FieldDescription
    Return  Type

    Select the type of the expected response:

    • String
    • XML
    • HTTP
    • JSON
    XPath

    Available when Return Type is XML, HTTP or JSON.

    The XPath expression used to resolve or filter the data that comes back in the selected format.

    Note

    Xpath namespaces syntax can only be used for XML response types.


    XML Namespaces

    Available when Return Type is XML or HTTP. This section has a toolbar with standard buttonsThe grid contains a list of the namespaces defined in an XML response.

    To add a namespace to the list, click 

    Insert excerpt
    _new
    _new
    nopaneltrue
    . PhixFlow opens a new XML Namespace Properties panel. To remove a namespace, use the
    Insert excerpt
    _delete
    _delete
    nopaneltrue
     in the toolbar.

    Insert excerpt
    _model_prop
    _model_prop
    nopaneltrue

    Advanced

    FieldDescription
    HTTP DatasourceSelect the HTTP datasource that this collector will collect from. For how to add a new one, see HTTP Datasource PropertiesTo select from a list, click 
    Insert excerpt
    _http_datasource
    _http_datasource
    namelist
    nopaneltrue
    .
    Datasource Instance Expression

    The datasource to which this collector is connected may list multiple instances from which the data may be accessed. Each HTTP datasource instance is identified by a unique string. This expression should evaluate to a string which allows the collector to determine the specific instance to use. If the expression is blank then the collector will assume that there is only one instance and will use that one by default. If there is more than one instance and no expression is provided here then an error will be thrown during analysis since the collector will be unable to determine which source to use.

    See also  HTTP datasource instance and Expressions and PhixScripts.

    Timeout (secs)The number of seconds to wait for a response from the corresponding HTTP datasource before a timeout is recorded.
    IconEnter the name of an icon to display in controls when this HTTP collector is used.
    Allow Non-Scheduled Collection

    Insert excerpt
    _check_box_tick
    _check_box_tick
    nopaneltrue
     to run the HTTP collector as part of any ad-hoc analysis run that requires this data. If not, it will only run as part of a scheduled Task Plan.

    Log Traffic

    Insert excerpt
    _check_box_tick
    _check_box_tick
    nopaneltrue
     to include HTTP traffic in the logs. This is useful for debugging problems.

    Insert excerpt
    _model_prop
    _model_prop
    nopaneltrue

    Advanced

    FieldDescriptionLog Traffic  Insert excerpt_check_box_tick_check_box_tick

    Insert excerpt
    _description
    _description
    nopaneltrue

     to include HTTP traffic in the logs. This is useful for debugging problems.

    Insert excerpt
    _

    description

    audit
    _

    description

    audit
    nopaneltrue

    Insert excerpt_property_tabs_property_tabsnameaudit-hnopaneltrue Insert excerpt_audit_auditnopaneltrue AnchorresponseExamplesresponseExamplesResponse ExamplesThis example

    Anchor
    responseExamples
    responseExamples
    Response Examples


    This example uses the following XML and HTML data.

    XML Data

    <?xml version ="1.0"?> <root xmlns:h="http://www.w3.org/TR/html4/"> <main page="PF Main Page" > <h:title h:name="PF Title">PF Title Text <h:datarow> <h:data h:initials="AA">Alistair Andrews</h:data> <h:data h:initials="BB">Bert Brown</h:data> </h:datarow> </h:title> <title name="Non namespace Title">Non namespace Title Text</title> </main> </root>

    HTML Data

    <html> <body nodename="Html Body"> <table> <tbody> <tr> <td initials="AA">Alistair Andrews</td> <td initials="BB">Bert Brown</td> </tr> </tbody> </table> </body> </html>

    The data is being pointed to by either HTTP datasources or XML/HTML File collectors respectively.

    The following table shows the different types of responses that can be returned from an HTTP Collector and how these can be used in the corresponding stream attribute expressions. A HTTP Collector response type of XML/HTML will mimic the responses from XML/HTML Collectors respectively.

    Response TypeXPath ExpressionExplanationStringn/aA String response should be referenced in the stream attribute expressions as in.value Note that in.value will contain the complete string data referenced above.XML/root/main/h:title
    Note

    The namspace prefix used here 'h' must be configured in the XML Namespace Properties.

    This XPath expression will bring back all elements matching the xpath expression including the parent/grandparents and all child elements/subelements. i.e

    <root xmlns:h="http://www.w3.org/TR/html4/"> <main page="PF Main Page" > <h:title h:name="PF Title">PF Title Text <h:datarow> <h:data h:initials="AA">Alistair Andrews</h:data> <h:data h:initials="BB">Bert Brown</h:data> </h:datarow> </h:title> </main> </root>

    The following examples show how to reference the returned xpaths html/xml data structure in stream attribute expressions:-
    • Xpath element text value: in.value -> returns 'PF Title Text'
    • Xpath element attibutes: in.h$name -> returns 'PF Title'
    • Xpath parent attributes: in.^.page -> returns 'PF Main Page'
    • Xpath child attributes: listToString(in.h$datarow.h$data.h$initials) -> returns 'AA,BB'
    • Xpath child attribute text values: listToString(in.h$datarow.h$data.value) -> returns 'Alistair Andrews,Bert Brown'

    Note the use of

    • $ instead of our usual : namespace notation.
    • ^ to traverse to the immediate parent element.
    • the listToString function to handle multiple matching child elements/attributes.
    HTML

    /html/body/table

    Note

    Namspaces are not supported in the Xpath expression for HTML response types.

    This XPath expression will bring back all elements matching the xpath expression including the parent/grandparents and all child elements/subelements. i.e

    <html> <body nodename="Html Body"> <table> <tbody> <tr> <td initials="AA">Alistair Andrews</td> <td initials="BB">Bert Brown</td> </tr> </tbody> </table> </body> </html>

    The following examples show how to reference the returned xpaths html/xml data structure in stream attribute expressions:-
    • Xpath parent attributes: in.^.nodename -> returns 'Html Body'
    • Xpath child attributes: listToString(in.tbody.tr.td.initials) -> returns 'AA,BB'
    • Xpath child attribute text values: listToString(in.tbody.tr.td.value) -> returns 'Alistair Andrews,Bert Brown'

    Note the use of:

    • ^ to traverse to the immediate parent element.
    • the listToString function to handle multiple matching child elements/attributes.
    • the optional html <tbody> tags. If these are not in your html data, then PhixFlow will insert them to conform with the HTML standards. Therefore when using absolute XPath expressions, the tbody tags need to be included even if they are not present in the incoming HTML data. That means /html/title/table/tr should be replaced with /html/title/table/tbody/tr or use //tr
      The same applies when referencing parent/child nodes within the stream attribute expressions.

    Advanced

    FieldDescriptionLog Traffic Insert excerpt_log_traffic2_log_traffic2nopaneltrue
    • Log HTTP Collector Connection Details : when ticked, PhixFlow always logs HTTP responses and requests for HTTP collectors, whatever is set here.
    Insert excerpt_log_traffic1_log_traffic1nopaneltrue

    Live Search
    spaceKey@self
    additionalnone
    placeholderSearch all help pages
    typepage

    Panel
    borderColor#00374F
    titleColorwhite
    titleBGColor#00374F
    borderStylesolid
    titleSections on this page

    Table of Contents
    maxLevel3
    indent12px
    stylenone

        Insert excerpt_terms_changing_terms_changingnopaneltrue

    This page is for a data modeller who needs to load data from an external source via HTTP.

    Overview

    An HTTP collector reads data from a HTTP Datasource. The collector defines how the data needed from the datasource is extracted to be used in PhixFlow.

    Insert excerpt_http_newlines_http_newlinesnopaneltrue

    To add a new HTTP collector to an analysis model:

  • Go to the model's toolbar → Create group.
  • Click Insert excerpt_http_httpnopaneltrue to expand the menu.Drag a  Insert excerpt_http_collector_http_collectornopaneltrue onto the analysis model.

    To add an existing HTTP collector to an analysis model, in the model diagram toolbar:

  • Go to the model toolbar → List group.
  • Click Insert excerpt_http_httpnopaneltrue to expand the menu.Click  Insert excerpt_http_collector_http_collectornopaneltrue to open the list of available collectors.
  • Drag an HTTP collector into the analysis model.
  • Table Values in a HTTP Collector

    To drive the lookups made by a HTTP collector from a table, the two must be connected using a lookup pipe. For example, a URL for a server can either be captured or calculated in an attribute called "ServerURL". The URL is then passed via a lookup pike to the HTTP collector to be used in its URL Expression

    If the pipe is called in, here is how the URL Expression would be written on the HTTP collector: 
      {substring(in.ServerUrl,9)}

    Insert excerpt_property_tabs_property_tabsnamebasic-hnopaneltrue Insert excerpt_parent_parentnopaneltrue

    Basic Settings

    FieldDescriptionNameEnter the name of the HTTP collector.Enabled Insert excerpt_check_box_tick_check_box_ticknopaneltrue when the configuration is complete and the collector is ready to be used.HTTP DatasourceSelect the HTTP datasource that this collector will collect from. For how to add a new one, see HTTP Datasource Properties.  To select from a list, click  Insert excerpt_http_datasource_http_datasourcenamelistnopaneltrue.HTTP Request Method
    Excerpt

    Select one of the following HTTP methods to use for the request:

    • GET or POST
    • GET
    • POST
    • DELETE
    • OPTIONS
    • PUT
    • PATCH

    We recommend that you select a method but if you do not, PhixFlow uses GET or POST by default. If the Send Message → Statement Expression:

    • evaluates to null or empty string, PhixFlow uses GET
    • is not empty, PhixFlow uses POST.

    For information, see the w3schools page about HTTP methods.

    IconEnter the name of an icon to display in controls when this HTTP collector is used.Timeout (secs)The number of seconds to wait for a response from the corresponding HTTP datasource before a timeout is recorded.Allow Non-Scheduled CollectionIf this is turned on, then the collector will run as part of any ad-hoc Analysis Engine run which requires this data. If not, it will only run as part of a scheduled Task Plan under the Analysis Engine.Datasource Instance Expression

    The datasource to which this collector is connected may list multiple instances from which the data may be accessed. Each HTTP datasource instance is identified by a unique string. This expression should evaluate to a string which allows the collector to determine the specific instance to use. If the expression is blank then the collector will assume that there is only one instance and will use that one by default. If there is more than one instance and no expression is provided here then an error will be thrown during analysis since the collector will be unable to determine which source to use.

    See also  HTTP datasource instance and Expressions and PhixScripts.

    Send Message

    Define details of the HTTP request sent to the HTTP Datasource to get the data required.

    FieldDescriptionURL Expression

    The URL to be used, without the leading http:// prefix. The URL may contain embedded expressions within { }. If this field is blank, the URL field on the httpDatasourceInstance is used directly.

    For Example, this expression adds to the base URL provided by the HTTP datasource instance:
        {_url}/sub1/sub2?param1=3

    The HTTP Collector will follow any HTTP redirections and return the final response.

    See also HTTP datasource instance and Expressions and PhixScripts.

    Statement ExpressionAn expression to generate the data that will be sent by the exporter to the datasource. For Example

    <?xml version ="1.0"?> <!DOCTYPE CORPORATE DASHBOARD "corpDash.dtd"> <results user="%USERNAME%" password="%PASSWORD%"> <monthlyTotals region={'"' + Region + '"'} division={'"' + Division + '"'}> <totalBilled>{'"' + TotalBilled + '"'}<\totalBilled> <totalCollected>{'"' + TotalCollected + '"'}<\totalCollected> <monthlyTotals> <\results>

    The username and password for the HTTP Datasource Instance are available as %USERNAME% and %PASSWORD%.

    The data will be encoded using the charset parameter specified by the Content-Type Header if one is present. If no Content-Type Header is set then ISO-8859-1 will be used. If the Content-Type header is set, but does not specify a charset then PhixFlow will use a default character set dependant on the content type.

    HTTP Headers

    This section has a toolbar with standard buttonsThe grid contains a list of the HTTP headers defined for this collector. To add a HTTP header to the list, click  Insert excerpt_new_newnopaneltrue. PhixFlow opens a new HTTP Header Properties properties tab. To remove a HTTP header, use the Insert excerpt_delete_deletenopaneltrue in the toolbar.

    Some headers will be set to default values if not provided. Automatically added headers may not appear in the debug log. The Content-Length header will be added to all requests and cannot be overridden by providing a value.

    Response

    Define the data response type/format that will be returned:

    • HTML: response type allows an XPath Expression to be specified in order to retrieve just specified sections of the data into XML structures.
    • XML: response type allows an XPath Expression to be specified in order to retrieve just specified sections of the data into XML structures. XML response types also support XML namespaces. The Xml Namspaces tab will be available when this response type is chosen.
    • String: response type will return the full data as a string value.

    Please see Response Examples for how the returned data can be used and evaluated in the corresponding stream attribute expressions.

    FieldDescriptionReturn  TypeThe type of the expected response : XML/HTTP/StringXPath

    The XPath expression used to resolve or filter the data that comes back in XML or HTML format.

    Note

    Xpath namespaces syntax can only be used for XML response types.

    XML Namespaces

    This section has a toolbar with standard buttonsThe grid contains a list of the namespaces defined in an XML response.

    To add a namespace to the list, click  Insert excerpt_new_newnopaneltrue. PhixFlow opens a new XML Namespace Properties panel. To remove a namespace, use the Insert excerpt_delete_deletenopaneltrue in the toolbar. Insert excerpt_model_prop_model_propnopaneltrue

    Advanced

    FieldDescriptionLog Traffic  Insert excerpt_check_box_tick_check_box_ticknopaneltrue to include HTTP traffic in the logs. This is useful for debugging problems. Insert excerpt_description_descriptionnopaneltrue Insert excerpt_property_tabs_property_tabsnameaudit-hnopaneltrue Insert excerpt_audit_auditnopaneltrue AnchorresponseExamplesresponseExamplesResponse Examples
    This example uses the following XML and HTML data.

    XML Data

    <?xml version ="1.0"?>

    namespace Title">Non namespace Title Text</title> </main> </root>

    HTML Data

    <html> <body nodename="Html Body"> <table> <tbody> <tr> <td initials="AA">Alistair Andrews</td> <td initials="BB">Bert Brown</td> </tr> </tbody> </table> </body> </html>

    The data is being pointed to by either HTTP datasources or XML/HTML File collectors respectively.

    The following table shows the different types of responses that can be returned from an HTTP Collector and how these can be used in the corresponding stream attribute expressions. A HTTP Collector response type of XML/HTML will mimic the responses from XML/HTML Collectors respectively.

    Response TypeXPath ExpressionExplanation
    Stringn/aA String response should be referenced in the stream attribute expressions as in.value Note that in.value will contain the complete string data referenced above.
    XML
    /root/main/h:title


    Note

    The namspace prefix used here 'h' must be configured in the XML Namespace Properties.


    This XPath expression will bring back all elements matching the xpath expression including the parent/grandparents and all child elements/subelements. i.e

    <root xmlns:h="http://www.w3.org/TR/html4/"> <main page

    ="PF Main Page" > <h:title h:name="PF Title">PF Title Text <h:datarow> <h:data h:initials="AA">Alistair Andrews</h:data> <h:data h:initials="BB">Bert Brown</h:data> </h:datarow> </h:title> <title name="Non namespace Title">Non namespace Title Text</title> </main> </root>

    HTML Data

    <html> <body nodename="Html Body"> <table> <tbody> <tr> <td

    ="PF Main Page" > <h:title h:name="PF Title">PF Title Text <h:datarow> <h:data h:initials="AA">Alistair

    Andrews</td> <td

    Andrews</h:data> <h:data h:initials="BB">Bert Brown</

    td>

    h:data> </

    tr>

    h:datarow> </

    tbody>

    h:title> </

    table>

    main> </

    body> </html>

    The data is being pointed to by either HTTP datasources or XML/HTML File collectors respectively.

    The following table shows the different types of responses that can be returned from an HTTP Collector and how these can be used in the corresponding stream attribute expressions. A HTTP Collector response type of XML/HTML will mimic the responses from XML/HTML Collectors respectively.

    Response TypeXPath ExpressionExplanationStringn/aA String response should be referenced in the stream attribute expressions as in.value Note that in.value will contain the complete string data referenced above.XML/root/main/h:title NoteThe namspace prefix used here 'h' must be configured in the XML Namespace Properties

    root>

    The following examples show how to reference the returned xpaths html/xml data structure in stream attribute expressions:-
    • Xpath element text value: in.value -> returns 'PF Title Text'
    • Xpath element attibutes: in.h$name -> returns 'PF Title'
    • Xpath parent attributes: in.^.page -> returns 'PF Main Page'
    • Xpath child attributes: listToString(in.h$datarow.h$data.h$initials) -> returns 'AA,BB'
    • Xpath child attribute text values: listToString(in.h$datarow.h$data.value) -> returns 'Alistair Andrews,Bert Brown'

    Note the use of

    • $ instead of our usual : namespace notation.
    • ^ to traverse to the immediate parent element.
    • the listToString function to handle multiple matching child elements/attributes.
    HTML

    /html/body/table


    Note

    Namspaces are not supported in the Xpath expression for HTML response types.


    This XPath expression will bring back all elements matching the xpath expression including the parent/grandparents and all child elements/subelements. i.e
    <root xmlns:h="http://www.w3.org/TR/html4/"> <main page="PF Main Page" > <h:title h:name="PF Title">PF Title Text <h:datarow> <h:data h:

    <html> <body nodename="Html Body"> <table> <tbody> <tr> <td initials="AA"

    >Alistair Andrews</h:data> <h:data h:

    >Alistair Andrews</td> <td initials="BB">Bert Brown<

    /h:data>

    /td> </tr> </

    h:datarow>

    tbody> </

    h:title>

    table> </

    main>

    body> </

    root>

    html>

    The following examples show how to reference the returned xpaths html/xml data structure in stream attribute expressions:
    -
  • Xpath element text value: in.value -> returns 'PF Title Text'
  • Xpath element attibutes: in.h$name
    -
    > returns 'PF Title'
    • Xpath parent attributes: in.^.
    page
    • nodename -> returns '
    PF Main Page
    • Html Body'
    • Xpath child attributes: listToString(in.tbody.
    h$datarowh$datah$initials
    • initials) -> returns 'AA,BB'
    • Xpath child attribute text values: listToString(in.tbody.
    h$datarowh$data
    • td.value) -> returns 'Alistair Andrews,Bert Brown'

    Note the use

    of$ instead

    of

    our usual

    :

    namespace notation.

    Advanced

    FieldDescriptionLog Traffic Insert excerpt_log_traffic2_log_traffic2nopaneltrue
    • Log HTTP Collector Connection Details : when ticked, PhixFlow always logs HTTP responses and requests for HTTP collectors, whatever is set here.
    Insert excerpt_log_traffic1_log_traffic1

    • ^ to traverse to the immediate parent element.
    • the listToString function to handle multiple matching child elements/attributes.
    HTML

    /html/body/table

    Note

    Namspaces are not supported in the Xpath expression for HTML response types.

    This XPath expression will bring back all elements matching the xpath expression including the parent/grandparents and all child elements/subelements. i.e

    <html> <body nodename="Html Body"> <table> <tbody> <tr> <td initials="AA">Alistair Andrews</td> <td initials="BB">Bert Brown</td> </tr> </tbody> </table> </body> </html>

    The following examples show how to reference the returned xpaths html/xml data structure in stream attribute expressions:-
    • Xpath parent attributes: in.^.nodename -> returns 'Html Body'
    • Xpath child attributes: listToString(in.tbody.tr.td.initials) -> returns 'AA,BB'
    • Xpath child attribute text values: listToString(in.tbody.tr.td.value) -> returns 'Alistair Andrews,Bert Brown'

    Note the use of:

    • ^ to traverse to the immediate parent element.
    • the listToString function to handle multiple matching child elements/attributes.
    • the optional html <tbody> tags. If these are not in your html data, then PhixFlow will insert them to conform with the HTML standards. Therefore when using absolute XPath expressions, the tbody tags need to be included even if they are not present in the incoming HTML data. That means /html/title/table/tr should be replaced with /html/title/table/tbody/tr or use //tr
      The same applies when referencing parent/child nodes within the stream attribute expressions.
    • the optional html <tbody> tags. If these are not in your html data, then PhixFlow will insert them to conform with the HTML standards. Therefore when using absolute XPath expressions, the tbody tags need to be included even if they are not present in the incoming HTML data. That means /html/title/table/tr should be replaced with /html/title/table/tbody/tr or use //tr
      The same applies when referencing parent/child nodes within the stream attribute expressions.

    Advanced

    FieldDescription
    Log Traffic

    Insert excerpt
    _log_traffic2
    _log_traffic2
    nopaneltrue

    • Log HTTP Collector Connection Details : when ticked, PhixFlow always logs HTTP responses and requests for HTTP collectors, whatever is set here.

    Insert excerpt
    _log_traffic1
    _log_traffic1
    nopaneltrue


    Live Search
    spaceKey@self
    additionalnone
    placeholderSearch all help pages
    typepage

    Panel
    borderColor#00374F
    titleColorwhite
    titleBGColor#00374F
    borderStylesolid
    titleSections on this page

    Table of Contents
    maxLevel3
    indent12px
    stylenone

       

    Insert excerpt
    _terms_changing
    _terms_changing
    nopaneltrue