Skip to end of metadata
Go to start of metadata


You receive the followng error while in Design32 when using the data source 'Scripting':

XML Parser Error: Element '{}data' is unexpected according to content model of parent element '{}field'.


There is a "data" statement in the script being used to replace field data that does not have the "@" symbol prefix.


label.fields.field.(@name == 'Barcode1').data=input2


Modify the script to have the "data" statement with the "@" prefix


label.fields.field.(@name == 'Barcode1').@data=input2

To correct:

  1. Navigate to Design32 by going to Start - All Programs - Loftware Labeling - Design32.

  2. Once in Design32 right-click on the label design and select Find Script.

  3. In the scripting data source box, type in your script.  For this article the following is an example script:

  4. Once the script is complete, select the Verify Script button.

  5. You will get a failure in the results box. The failure reads:

     XML Parser Error: Element '{}data' is unexpected according to content model of parent element '{}field'.
  6. This error means that somewhere in the script the element 'data' is not formatted correctly.
  7. In the example above if you search for the word 'data' you come to the following line :
       label.fields.field.(@name == 'Quantity').data = String(cases * str);
  8. All field identifiers should start with '@' in order for Loftware's XML parser to correctly identify the field.  In the sample above you will notice that '.data' is missing the '@' symbol.
  9. The field should look like this:
     label.fields.field.(@name == 'Quantity').@data = String(cases * str);
  10. Once you add the '@' and test the script you will get the Script verification completed successfully message in the results box. Select OK and the script should process without errors.



Article Number



All supported LPS family product versions.


All Windows environments.