Altova XMLSpy 2025 Enterprise Edition

Entering data in Authentic View

Home Prev Top Next

Data is entered into the XML document directly in the main window of Authentic View. Additionally for attributes, data (the value of the attribute) can be entered in the Attributes entry helper. Data is entered (i) directly as text, or (ii) by selecting an option in a data-entry device, which is then mapped to a predefined text entry.

 

Adding text content

You can enter element content and attribute values directly as text in the main window of Authentic View. To insert content, place the cursor at the location where you want to insert the text, and type. You can also copy text from the clipboard into the document. Content can also be edited using standard editing mechanisms, such as the Caps and Delete keys. For example, you can highlight the text to be edited and type in the replacement text with the Caps key on.

 

For example, to change the name of the company, in the Name field of Office, place the cursor after Nanonull, and type in USA to change the name from Nanonull, Inc. to Nanonull USA, Inc.

 

text_editing

 

If text is editable, you will be able to place your cursor in it and highlight it, otherwise you will not be able to. Try changing any of the field names (not the field values), such as "Street", "City", or "State/Zip," in the address block. You are not able to place the cursor in this text because such text is not XML content; it is derived from the StyleVision Power Stylesheet.

 

Inserting special characters and entities

When entering data, the following type of content is handled in a special way:

 

Special characters that are used for XML markup (ampersand, apostrophe, greater than, less than, and quotes). These characters are available as built-in entities and can be entered in the document by double-clicking the respective entity in the Entities entry helper. If these characters occur frequently (for example, in program code listings), then they can be entered within CDATA sections. To insert a CDATA section, right-click at the location where you wish to enter the CDATA section, and select Insert CDATA Section from the context menu. The XML processor ignores all markup characters within CDATA sections. This also means that if you want a special character inside a CDATA section, you should enter that character and not its entity reference.

Special characters that cannot be entered via the keyboard should be entered by copying them from the character map of your system to the required location in the document.

A frequently used text string can be defined as an entity, which appears in the Entities entry helper. The entity is inserted at the required locations by placing the cursor at each required location and double-clicking the entity in the entry helper. This is useful for maintenance because the value of the text string is held in one location; if the value needs to be changed, then all that needs to be done is to change the entity definition.

 

Note:When markup is hidden in Authentic View, an empty element can easily be overlooked. To make sure that you are not overlooking an empty element, switch large or small markup on.

 

Try using each type of text content described above.

 

Adding content via a data-entry device

In the content editing you have learned above, content is added by directly typing in text as content. There is one other way that element content (or attribute values) can be entered in Authentic View: via data-entry devices.

 

Given below is a list of data-entry devices in Authentic View, together with an explanation of how data is entered in the XML file for each device.

 

Data-Entry Device

Data in XML File

Input Field (Text Box)

Text entered by user

Multiline Input Field

Text entered by user

Combo box

User selection mapped to value

Check box

User selection mapped to value

Radio button

User selection mapped to value

Button

User selection mapped to value

 

In the static table containing the address fields (shown below), there are two data-entry devices: an input field for the Zip field and a combo-box for the State field. The values that you enter in the text fields are entered directly as the XML content of the respective elements. For other data-entry devices, your selection is mapped to a value.

 

data_entry_devices_gen

 

For the Authentic View shown above, here is the corresponding XML text:

 

<Address>

<ipo:street>119 Oakstreet, Suite 4876</ipo:street>

<ipo:city>Vereno</ipo:city>

<ipo:state>DC</ipo:state>

<ipo:zip>29213</ipo:zip>

</Address>

 

Notice that the combo-box selection DC is mapped to a value of DC. The value of the Zip field is entered directly as content of the ipo:zip element.

 

© 2018-2024 Altova GmbH