[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] MacPerl and XML



On Fri, 29 Jan 1999, Chris Nandor wrote:

> At 00.32 -0500 1999.01.29, Jeff at MacTech wrote:
> >I suppose I could just install it an see, but I'll ask anyway: I thought
> >that the "standard" XML-Parser called expat as an external app to do the
> >actual parsing. Has it now been wrapped into an XS library, or was it
> >always this way (or something else)?
> 
> XML::Parser, as far as I know, always called expat via XS.  There is an
> XML::Parser::Expat module and corresponding shared library.
> 
> Interesting note is that Arved and I found a bug in expat.  :)  XML is
> supposed to use the character \012 for newlines, but instead, the parser
> uses \n, which, as you know, differs in value from compiler to compiler (or
> library to library) on a Mac.
> 
> Aside from that one problem (and some headaches getting all the files in
> the right places, which is just Makefile and Build Rules stuff) XML::Parser
> built fine for MacPerl, as I recall.  Arved is building it now though, so
> maybe he has more to add.
> 
No, that's it in a nutshell. The MacPerl XS build process is under MPW,
where the default behaviour is to map \n to \015. So all of the \n's in
expat (to be precise, xmlparse.c) need to be explicitly specified. In
point of fact, I ended up hardcoding them as decimal 10, because octal and
hexadecimal notations were breaking some of the encoding tests.

If you were to grab the expat source and want to use it in a Codewarrior
project (i.e. CW IDE, not CW MPW) you wouldn't have to change anything at
all.

The pain, as Chris mentioned, had to do more with the source file tree.

Arved



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch