Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error parsing xml
#1
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
Code:
Copy      Help
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à>
#2
This is a limitation if IXml. In tag names supports only A-Z a-z 0-9 _ . : -.
Use MSXML.

Macro Macro1049
Code:
Copy      Help
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
#3
Thank's for this tips


Forum Jump:


Users browsing this thread: 1 Guest(s)