× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Greetings,
The following snippet first gets XML into /tmp/trial.xml file then reads the file with header of <?xml version="1.0" encoding="ISO-8859-9"?> accessed at http://www.tcmb.gov.tr/kurlar/today.xml but cannot parse it and reports error message, 'XML_Parse() error at lin/col 1/0: 2 syntax error'.

Any help would be appreciated.
Thank you,
Nihat.

-------
soapfile = '/tmp/trial.xml';
rc = http_url_get('http://www.tcmb.gov.tr/kurlar/today.xml': soapFile);

if (rc <> 1);
dsply 'http_url_get() error..';
else;
fd = open(soapFile
: O_RDONLY + O_TEXTDATA + O_CCSID
: 0
: 1208);
if (fd < 0);
dsply 'XML open() error..';
endif;

p = XML_ParserCreate(XML_ENC_UTF8);
if (p = *NULL);
dsply 'XML_ParserCreate() error..';
endif;

XML_SetStartElementHandler(p: %paddr(start));
XML_SetEndElementHandler(p: %paddr(end));
XML_SetCharacterDataHandler(p: %paddr(chardata));

dou '1';

len = read(fd: %addr(buff): %size(buff));
if (len < 1);
leave;
endif;

if (XML_Parse(p
: buff
: %len(buff)
: 1) = XML_STATUS_ERROR);
msg = 'XML_Parse() error at lin/col '
+ %char(XML_GetCurrentLineNumber(p)) + '/'
+ %char(XML_GetCurrentColumnNumber(p)) + ': '
+ %char(XML_GetErrorCode(p)) + ' '
+ %str(XML_ErrorString(XML_GetErrorCode(p)));
dsply msg;
msg = http_error();
unlink(soapfile);
endif;

enddo;

XML_ParserFree(p);
callp close(fd);
endif;
-------
[http://www.avivasa.com.tr/i/Assets/AvivaSA_Imza/images//gelecegini_01.png]<https://www.avivasa.com.tr/gelecegini-biriktirenler-kulubu-nedir> [http://www.avivasa.com.tr/i/Assets/AvivaSA_Imza/images//gelecegini_02.png] <https://www.avivasa.com.tr/gelecegini-biriktirenler-kulubu-nedir> [http://www.avivasa.com.tr/i/Assets/AvivaSA_Imza/images//gelecegini_03.png] <https://www.avivasa.com.tr/gelecegini-biriktirenler-kulubu-nedir>

Bu e-postanin içerdigi bilgiler (ekleri dahil olmak üzere) gizlidir. Onayimiz olmaksizin üçüncü kisilere açiklanamaz. Bu mesajin gönderilmek istendigi kisi degilseniz, lütfen mesaji sisteminizden derhal siliniz. AvivaSA Emeklilik ve Hayat A.S. bu mesajin içerdigi bilgilerin dogrulugu veya eksiksiz oldugu konusunda bir garanti vermemektedir. Bu nedenle bilgilerin ne sekilde olursa olsun içeriginden, iletilmesinden, alinmasindan, saklanmasindan sorumlu degildir. Bu mesajin bilinen virüslere karsi kontrolleri AvivaSA Emeklilik ve Hayat A.S. tarafindan yapilmistir. Ancak internet iletisiminde güvenlik ve hatasiz gönderim garanti edilemeyeceginden, mesajin yerine ulasmamasi, geç ulasmasi, içeriginin bozulmasi ya da mesajin virüs tasimasi gibi problemler olusabilir. AvivaSA Emeklilik ve Hayat A.S. bu tip sorunlardan sorumlu tutulmaz. Bu mesajin içerigi yazarina ait olup AvivaSA Emeklilik ve Hayat A.S.'nin görüslerini içermeyebilir.

The information contained in this e-mail (including any attachments) is confidential. It must not be disclosed to any person without our authority. If you are not the intended recipient, please delete it from your system immediately. AvivaSA Emeklilik ve Hayat A.S. makes no warranty as to the accuracy or completeness of any information contained in this message and hereby excludes any liability of any kind for the information contained therein or for the information transmission, reception, storage or use of such in any way whatsoever. This message is scanned for known viruses by AvivaSA Emeklilik ve Hayat A.S. But Internet communications cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, arrive late or contain viruses. The AvivaSA Emeklilik ve Hayat A.S. therefore does not accept liability for any errors or omissions in the context of this message which arise as a result of Internet transmission. Any opinions expressed in this message are those of the author and may not necessarily reflect the opinions of AvivaSA Emeklilik ve Hayat A.S.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.