跳到主内容

搜索

搜索

Special Chars In Xml Datasource

评论

1 条评论

  • Avatar
    Shotaro Ito
    Hi Massimo,
    your XML format looks different from BarTender XML Script, so I assume you have a custom software to read XML file and print format.
    [b]BarTender Enterprise Automation edition[/b] has its own XML script to specify format and files, and it handles predefined entities like ">" and "<" properly.

    Example of BarTender XML script. (default extension is *.btxml)
    [xml]
    <?xml version="1.0" encoding="utf-8"?>
    <XMLScript Version="2.0">
    <Command>
    <Print>
    <Format CloseAtEndOfJob="true">C:\XMLSample1.btw</Format>
    <PrintSetup>
    <Printer>Zebra TLP-3844Z</Printer>
    <IdenticalCopiesOfLabel>3</IdenticalCopiesOfLabel>
    </PrintSetup>
    <NamedSubString Name="EFFICIENCY">
    <Value>&gt;100%</Value>
    </NamedSubString>
    </Print>
    </Command>
    </XMLScript>
    [/xml]
    It especially works well with Automated printing by Commander.
    For detail and usage of BarTender XML Script, please refer to BarTender online help > Automating Bartender > Automation with BarTender XML Script.

    In your case, I assume your custom application doesn't handle predefined entities like "&gt;" which you could ask the developer of the application.
    One simple workaround is, whenever you find "&gt;" in datasource, replace that by ">" in VB script.
    In BarTender, Text object's datasource > More options > VB Script, in OnProcessData script, set code like
    [code]Value = Replace(Value, "&gt;",">")
    Value = Replace(Value, "&lt;","<")[/code]

    Hope that helps!
    0

请先登录再写评论。