doty58493 2015-05-18 18:34
浏览 46

xml编码在php页面中注册为字符串

I have a .php page with a javascript function that loads XML data to print a barcode, however when I define my XML, the

 <?xml version="1.0" encoding="utf-8?>

registers as a string for some reason. In an HTML page it works fine but im assuming the opening ? is causing an issue with php. Any suggestions, or a workaround for this?

  var labelXml = '<?xml version="1.0" encoding="utf-8"?>\
            <DieCutLabel Version="8.0" Units="twips">\
            <PaperOrientation>Landscape</PaperOrientation>\
            <Id>Address</Id>\
            <PaperName>30252 Address</PaperName>\
            <DrawCommands>\
            <RoundRectangle X="0" Y="0" Width="1581" Height="5040" Rx="270" Ry="270"/>\
            </DrawCommands>\
            <ObjectInfo>\
            <BarcodeObject>\
            <Name>BARCODE</Name>\
            <ForeColor Alpha="255" Red="0" Green="0" Blue="0"/>\
            <BackColor Alpha="255" Red="255" Green="255" Blue="255"/>\
            <LinkedObjectName></LinkedObjectName>\
            <Rotation>Rotation0</Rotation>\
            <IsMirrored>False</IsMirrored>\
            <IsVariable>False</IsVariable>\
            <Text>*E200001*</Text>\
            <Type>Code39</Type>\
            <Size>Medium</Size>\
            <TextPosition>Bottom</TextPosition>\
            <TextFont Family="Lucida Grande" Size="10" Bold="False" Italic="False" Underline="False" Strikeout="False"/>\
            <CheckSumFont Family="Lucida Grande" Size="10" Bold="False" Italic="False" Underline="False" Strikeout="False"/>\
            <TextEmbedding>None</TextEmbedding>\
            <ECLevel>0</ECLevel>\
            <HorizontalAlignment>Center</HorizontalAlignment>\
            <QuietZonesPadding Left="0" Right="0" Top="0" Bottom="0"/>\
            </BarcodeObject>\
            <Bounds X="331.2" Y="328.0469" Width="4455.625" Height="1044.844"/>\
            </ObjectInfo>\
            </DieCutLabel>';
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 phython如何实现以下功能?查找同一用户名的消费金额合并—
    • ¥15 孟德尔随机化怎样画共定位分析图
    • ¥18 模拟电路问题解答有偿速度
    • ¥15 CST仿真别人的模型结果仿真结果S参数完全不对
    • ¥15 误删注册表文件致win10无法开启
    • ¥15 请问在阿里云服务器中怎么利用数据库制作网站
    • ¥60 ESP32怎么烧录自启动程序,怎么查看客户esp32板子上程序及烧录地址
    • ¥50 html2canvas超出滚动条不显示
    • ¥15 java业务性能问题求解(sql,业务设计相关)
    • ¥15 52810 尾椎c三个a 写蓝牙地址