  | |  | How is the encoding attribute used? | How is the encoding attribute used? 2003-04-17 - By Greg Hess
Hi All, How does the Xerces parser handle the document declaration <?xml version="1.0" encoding="utf-8" ?> and is it used by the parser? Does it automatically encode and decode values inserted and fetched in text nodes? Is the programmer required to evaluate this attribute and determine how to decode the XML document? If it is not automatically encoded/decoded are there any tools to provide this functionality for ISO-8859-1/ UTF-8 character data? Many thanks, Greg
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft -com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http: //www.w3.org/TR/REC-html40">
<head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 10"> <meta name=Originator content="Microsoft Word 10"> <link rel=File-List href="cid:filelist.xml@(protected)"> <!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:DoNotRelyOnCSS/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> <w:DocumentKind>DocumentEmail</w:DocumentKind> <w:EnvelopeVis/> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--> <style> <!-- /* Font Definitions */ @(protected) {font-family:Courier; panose-1:2 7 4 9 2 2 5 2 4 4; mso-font-alt:"Courier New"; mso-font-charset:0; mso-generic-font-family:modern; mso-font-format:other; mso-font-pitch:fixed; mso-font-signature:3 0 0 0 1 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline; text-underline:single;} code {mso-ansi-font-size:8.5pt; mso-bidi-font-size:8.5pt; font-family:Courier; mso-ascii-font-family:Courier; mso-fareast-font-family:"Times New Roman"; mso-hansi-font-family:Courier; mso-bidi-font-family:"Courier New"; color:#003366;} span.EmailStyle17 {mso-style-type:personal-compose; mso-style-noshow:yes; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; font-family:Arial; mso-ascii-font-family:Arial; mso-hansi-font-family:Arial; mso-bidi-font-family:Arial; color:windowtext;} @(protected) Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1" /> </o:shapelayout></xml><![endif]--> </head>
<body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Hi All,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>How does the Xerces parser handle the document declaration < /span></font><code><font size=1 color="#003366" face=Courier><span style='font-size:8.5pt'><?xml version="1.0" encoding="utf-8" ?> </span></font></code> <code><font size=2 color=black face=Arial><span style='font-size:10.0pt;font-family:Arial; color:windowtext'>and is it used by the parser?<o:p></o:p></span></font></code> </p>
<p class=MsoNormal><code><font size=2 color=black face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'>Does it automatically encode and decode values inserted and fetched in text nodes? Is the programmer required to evaluate this attribute and determine how to decode the XML document? If it is not automatically encoded/decoded are there any tools to provide this functionality for </span></font></code><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"; background:white;mso-highlight:white'>ISO-8859-1</span></font><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>/ UTF-8 character data?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10 .0pt; font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10 .0pt; font-family:"Courier New"'>Many thanks,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10 .0pt; font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10 .0pt; font-family:"Courier New"'>Greg</span></font><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>
</div>
</body>
</html>
|
|
 |