error parsing xml

Creating macros. Working with QM.

error parsing xml

Postby omarbr on Fri Oct 13, 2017 4:12 pm

Hi, i'm biggenner to use quickmacros.

when run this macros, error when load xml with tag <qtà>8<qtà>
quickmacros setted unicode, xml file is utf-8
how wrong?
Macro TestXml     ?
str nameFile = "C:\temp\20151126092746098_Parte4.xml";
str errorString
out F"start process: {nameFile}"

IXml x._create
x.FromFile(F"{nameFile}") ;;load XML file
err
,errorString = "errore open xml!"
,out "Error: %s" x.XmlParsingError; ;;error if the file is corrupted

Error: <qt >8</qtà>
omarbr
 
Posts: 7
Joined: Fri Oct 13, 2017 4:01 pm

Re: error parsing xml

Postby Gintaras on Fri Oct 13, 2017 4:49 pm

This is a limitation if IXml. In tag names supports only A-Z a-z 0-9 _ . : -.
Use MSXML.

Macro Macro1049     ?
str xml=
;<?xml version="1.0" encoding="utf-8" ?>
;<root>
;,<qtà>ABC</qtà>
;</root>

;IXml x._create
;x.FromString(xml) ;;error

typelib MSXML {F5078F18-C551-11D3-89B9-0000F81FE221} 6.0 ;;use 3.0 if want to support Windows XP

MSXML.DOMDocument60 doc._create
;doc.load("file")
doc.loadXML(xml)

out doc.xml

Gintaras
Site Admin
 
Posts: 10385
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania

Re: error parsing xml

Postby omarbr on Mon Oct 16, 2017 7:39 am

Thank's for this tips
omarbr
 
Posts: 7
Joined: Fri Oct 13, 2017 4:01 pm


Return to General

Who is online

Users browsing this forum: No registered users and 2 guests

cron