Am I losing my mind or has Unidata's DOM and XML support been designed to win awards for being ridiculously impossible? In the past four extremely frustrating hours, I've encountered:
a) Documentation that refers to an include file that doesn't exist (Unidata UniBASIC Extensions [7.1] pdf page 369 - UNIDATA.INCLUDE) b) Missing equates in the XML.H include that are ABSOLUTELY ESSENTIAL to make the demo programs work (same document, page 412, XML.FROM.FILE, XML.FROM.STRING) c) Absolutely zero useful or applicable information for debugging (more on this below); d) Incorrect syntax for calling functions (same doc, pdf page 404, et al.) e) Invalid XML in the sample as printed in the documentation (same doc, pdf page 404, spaces between version, =, and "1.0") I found an XML.H include in a file called INCLUDE but it's missing much of the equates needed to do the samples. I found the Universe XML.H to be much more complete but what confidence to I have that the Universe version of this include defines the right values for Unidata? Seriously, all I'm trying to accomplish at this point is opening an XML document via XDOMOpen. Here's the code: $INCLUDE INCLUDE UVXML.H ;* This is the Universe XML.H * NO.OPEN = '' OPEN 'IMPORTS' TO F.IMPORTS ELSE NO.OPEN := 'IMPORTS ' * IF (NO.OPEN NE '') THEN PRINT NO.OPEN : 'not opened' STOP END * READ ITEM.IMPORTS FROM F.IMPORTS,'KEYDATA.TXT' ELSE ITEM.IMPORTS = '' * STATUS = XDOMOpen(ITEM.IMPORTS,XML.FROM.STRING,MYDOM) IF (STATUS EQ XML.SUCCESS) THEN PRINT 'OK' STATUS = XDOMClose(MYDOM) END ELSE PRINT STATUS STATUS = XMLGetError(CODE,MSG) PRINT 'Code=' : CODE PRINT 'Msg =' : MSG END The record is read from the file without difficulty and is a standard multi-attributed text string. The STATUS gets returned as -1 from the XDOMOpen even though the record is properly formed XML. The error code is 30 and the message is: Fatal error at file 'U2XMLMemoryBufferID', line 1 column 39. Message: An exception occurred! Type: TranscodingException, Message: An invalid multi-byte source text sequence was encountered! Okay, that'd make some sense if this wasn't a strictly US-ASCII record - which it is. The only thing that's high order is the attribute marks. And Unidata thinks this is multibyte? Here's the XML: <?xml version="1.0"?> <Name>Bob</Name> I just can't believe that this is so far off the mark. Documentation is wrong, samples are impossible to implement, includes are incomplete, and this is supposedly a supported feature of the environment??? Please, if anyone has any sanity, I'm open to it. -K2 ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
