  | |  | XML processing/transforming approaches | XML processing/transforming approaches 2003-04-24 - By Tung Tran
Hello everyone,
Im working on a XML processing application using Xerces / Xalan. Data will pass two parsers before being transformed to HTML. Im considering between two approaches:
1 Putting two parsers in two threads and connecting them with a piped stream (PipedReader/PipedWriter). 2 Using 2 XMLFilter objects to join the parsers.
Id like to ask if any of you have experience with similar situation (I guess its fairly common), especially in terms of performance.
Thanks in advance, Tung Tran
<html 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=iso-8859-1"> <meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 9"> <meta name=Originator content="Microsoft Word 9"> <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:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:DocumentKind>DocumentEmail</w:DocumentKind> <w:EnvelopeVis/> </w:WordDocument> </xml><![endif]--> <style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0pt; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig {margin:0pt; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} span.EmailStyle15 {mso-style-type:personal-compose; mso-ansi-font-size:10.0pt; mso-ascii-font-family:Arial; mso-hansi-font-family:Arial; mso-bidi-font-family:Arial; color:black;} @(protected) Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style> </head>
<body lang=EN-US style='tab-interval:36.0pt'>
<div class=Section1>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family: Arial'>Hello everyone,<o:p></o:p></span></font></span></p>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family: Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font>< /span></p>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family: Arial'>I’m working on a XML processing application using Xerces / Xalan. Data will pass two parsers before being transformed to HTML. I’m considering between two approaches:<o:p></o:p></span></font></span></p>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family: Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font>< /span></p>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family: Arial'>1 – Putting two parsers in two threads and connecting them with a piped stream (PipedReader/PipedWriter).<o:p></o:p></span></font></span></p>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family: Arial'>2 – Using 2 XMLFilter objects to join the parsers.<o:p></o:p>< /span></font></span></p>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family: Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font>< /span></p>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family: Arial'>I’d like to ask if any of you have experience with similar situation (I guess it’s fairly common), especially in terms of performance.<o:p></o:p> </span></font></span></p>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family: Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font>< /span></p>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family: Arial'>Thanks in advance,<o:p></o:p></span></font></span></p>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family: Arial'>Tung Tran<o:p></o:p></span></font></span></p>
</div>
</body>
</html>
|
|
 |