⎕XML does not like <?xml - should it???

General APL language issues
Post Reply
User avatar
MBaas
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany
Contact:

⎕XML does not like <?xml - should it???

Post by MBaas »

A standard tag such as

Code: Select all

<?xml version="1.0" ?> 

causes an error "XML error at start of text - orphaned data" - I'm just wondering if that initial tag shouldn't be supported when processing apl-to-array...
User avatar
Richard|Dyalog
Posts: 44
Joined: Thu Oct 02, 2008 11:11 am

Re: ⎕XML does not like <?xml - should it???

Post by Richard|Dyalog »

You are correct; that is expected to work. The message indicates that ⎕XML believes that the first element of the right argument character vector is neither a space or '<'. You could establish whether this is the case by passing your XML text to ⎕UCS and checking that you get 60 as the first element in the result.

If you are reading the XML from a file using ⎕NREAD etc, it is possible there may have been a Byte Order Mark (BOM) at the start of the file which you have imported.

If ⎕UCS either does show the expected 60 in the first element, or does not and it is not clear why, then please send me a workspace via Support and I'll see if I can determine what's going on for you.
User avatar
MBaas
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany
Contact:

Re: ⎕XML does not like <?xml - should it???

Post by MBaas »

Thanks Richard. After some more hours of development my latest xml-files are created differently and ⎕XML behaves correctly now ;-)
Post Reply