Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: creating an XML string

by steves (Curate)
on Dec 29, 2004 at 16:12 UTC ( #418008=note: print w/ replies, xml ) Need Help??


in reply to creating an XML string

Regarding XML and entities, someone may benefit from some knowledge I picked up:

  • There is no need to declare numeric entities in order for them to parse okay with most (or maybe all) XML parsers. i.e., only named entities need to be declared. XML, of course, has three named entities pre-defined since they're so core: &, <, and >.
  • You can pull in all standard HTML entities by using this sort of DOCTYPE declaration:
    <!DOCTYPE doc [ <!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent"> %HTMLlat1; <!ENTITY % HTMLspecial PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent"> %HTMLspecial; <!ENTITY % HTMLsymbol PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent"> %HTMLsymbol; ]>

I've found the above knowledge useful since so much of the XML I create is for the purpose of transmitting web based content, which includes HTML entities.


Comment on Re: creating an XML string
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://418008]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2014-07-12 06:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (238 votes), past polls