User manual

HTTP server functions/web pages
FP Web-Server V.2.8 113
12.1.15 Notes on XML files with PLC data
The FP Web-Server can deliver XML files
The FP Web-Server's http server can also deliver PLC data within XML files.
Similar to an HTML file, the XML file can include the special PLC data tag
(see "Data fields for displaying PLC data on HTML pages" on p. 87)
{TTxxxy_aa_bb}. This tag is replaced by the actual PLC data at the time
the XML file is requested (see p. 83) from a client in the form
"http://199.199.26.52/plc?filename.xml"
General XML Info
The XML file format is a sort of ASCII text file designed for data exchange
(data import/export, database interface …). An XML file contains only
structured data and not style or format information. An XSL file with style
and format information is needed to transform an XML into a different file
(display) format. The "transformNode()" function of the Microsoft Internet
Explorer is used to take the XML data and an XSL format definition to
generate an HTML page.
XML file handling is carried out in four steps:
1. For example, the user generated XML file (including PLC data tags)
"Producn.xml" may look like:
<?xml version="1.0" encoding="ISO8859-1"?>
<Production
xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance">
<Unit>
<Type>{DT10_10_s}</Type>
<Produced>{DT18_6_u}</Produced>
<Rejected>{DT19_6_u}</Rejected>
<State>{R11_off_on}</State>
</Unit>
</Production>
2. The XML file "Producn.xml" is transferred to the FP Web-Server unit via
the FP Web Configurator Tool. In this example we use an FP
Web-Server unit with the IP address 199.199.26.52.
3. A TCP client can request the FP Web-Server unit's http server to deliver
the XML file "Producn.xml" (including current PLC data), which takes on
the form: http://199.199.26.52/plc?Producn.xml
This file can be read e.g. by an Internet browser.
4. The client will receive the following resulting XML file, for example: