XML/XPath
XPath – XML Query Language
The Extensible Markup Language (XML) is an important standard for communicating structured data across the internet. For this reason, XML is also used both for value or parameter entry and output in IT-connected and internet-ready production systems around the world. The XML Path Language – in short XPATH – allows easy XML data access for the OPC Router. The XPath plug-in allows easy extraction of desired information, which is then passed on to other customer-specified destinations in other connected systems. The XML/XPath functionality is already included in the basic version of the OPC Router.
That’s how easy it is.
Connecting Systems
Transfer Objects
The transfer object of the XPath plug-in allows access to incoming XML documents.
XPath Query
The query expects an XML document as entry data field. The XPath query is created and formulated in the transfer object by extracting defined data portions – and also data structures – from the source document. Then, the data output is made available to the subsequent objects as data field.
Trigger
The XPath Plug-in does not have its own trigger functions but uses the trigger functions available in the OPC Router.
Browsing
The XPath Plug-in does not use browsing.
XML/XPath Plug-in Application Examples
Evaluate XML responses from REST interfaces
Various data formats are used for system integration via REST interface. Besides JSON, many systems respond to REST requests with XML formatted data. With the integrated XPath object, data can be directly addressed and extracted within the XML packet. A simple example of a REST call with XML response is the exchange rate query of the European Central Bank (ECB). Using XPath, any exchange rate field can be addressed and extracted for a subsequent transfer.
Generate XML files for system interfaces
XML files are often used as a file-based data interface between systems. If the OPC Router is used as middleware for coupling, XPath objects can be used to create and evaluate the interface files according to the specifications of the system to be coupled. Any other OPC Router plug-ins, such as an MS SQL database or a process controller (via OPC UA), serve as the source for the data converted to XML.