I think I'm suffering from a basic misunderstanding here, so please feel free to tell me I'm stupid so long as you then explain why I'm stupid.

This is a fairly long post as I want to try to explain what I'm trying to do before I get to the question.

I have the beginnings of a website and I want to add more content. However I want to make adding things easy, so that I don't have to keep cutting and pasting headers and footers when I change something.

I thought this would be an ideal job for Perl, so I converted all the files to XHTML using HTML Tidy. I've then tried various modules to process the files.

If you look at the site you can see that some of the places and people mentioned have non-English names, containing characters such as ö, ç and é.

The XML modules I've tried so far mostly just delete these entities. XML::Grove seems to be the best, converting them to ÃX, where X is another odd character.

This is where I get to the point:why are the other modules just deleting the entities? Do I need to keep a version of the XHTML DTD locally for the modules to refer to? Do I need to be supplying some special options to XML::Parser or XML::Parser::PerlSAX?

If you really want to see some example code let me know, I have to transfer files between work (here) and home (where I'm playing with XML) on Zip disks

:-(

--
Kevin O'Rourke

In reply to XML and entities, what am I doing wrong? by kevin_i_orourke

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.