Edit xml files, Save xml files in notepad, Test xml files – Rockwell Automation FactoryTalk View Machine Edition Users Guide User Manual

Page 624

Advertising
background image

F

ACTORY

T

ALK

V

IEW

M

ACHINE

E

DITION

U

SER

S

G

UIDE

H-2

• •

For information about using the Graphics Import Export Wizard, see Help.

FactoryTalk View creates XML files for the selected graphic displays, in the location you
specify.

FactoryTalk View also creates a file called BatchImport_Application name.xml, in the
same location. You can use this file to import multiple displays at the same time. To
import a different set of displays than you exported, edit the list of display names in the
BatchImport_Application name.xml file.

Edit XML files

We recommend that you use Notepad to edit your XML files.

If you do not want to change a property, you don’t need to include it in the XML file.
When you import the file, if you select the option “Create new objects in the display,”
properties that are not listed in the file are set to their default values. If you select the
option “Update existing objects on the display,” only properties that are listed in the file
are updated with imported information.

Save XML files in Notepad

Save XML files created or edited in Notepad using either UTF-8 or UTF-16 file format.
Notepad’s Unicode file type corresponds to UTF-16 file format. For files containing
strings in English or other Latin-based languages, UTF-8 is recommended, to reduce the
size of the XML file. For other languages such as Chinese, Japanese, or Korean, UTF-16
is recommended.

The first line of every XML file contains XML version and encoding attributes. Make
sure the encoding attribute matches the format that you are going to use when you save
the file. For example, if the original file was saved in UTF-8 format and you plan to save
it in UTF-16 format, make sure the first line specifies encoding=“UTF-16”.

Test XML files

An XML file must be well-formed to be imported. To find out whether your XML file is
well-formed, test it.

To test an XML file

Open the XML file in Internet Explorer.

If you can see the XML code, your file is well-formed. If the XML code is not well-
formed, Internet Explorer shows an error message.

If you include attributes for an object whose name does not match one of those in the graphic
display, the attributes for that object are not imported. Attributes for all other objects in the file
whose names do match the ones in the graphic display are imported.

Advertising