Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: creating an XML string

by steves (Curate)
on Dec 29, 2004 at 16:12 UTC ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-03-29 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found