把xml文件用jdom(或其他方法)解析然后用itext画成pdf
请高手帮忙 把下面的xml文件用jdom(或其他方法)解析然后用itext画成pdf
非常着急,非常感谢大家!
<?xml version="1.0" encoding="iso-8859-1"?>
<document format="A4.xsi">
<header test="aaa" page="1.jsp">
<header-content name="page"/>
<header-content name="first-page">
<TABLE template="TRNDOC:HeaderLineLogo">
<IMAGE editlevel="0" href="EN\WLOGODOS.BMP" partition="frame" width="1in"/>
<CELL litid="X0000980" editlevel="0" width="1in" line-spacing="100%">
<BR/>
</CELL>
<CELL litid="X0000990" editlevel="0" width="2,20in" line-spacing="100%">
<B>
<PRINTCONTEXT/>
</B>
<BR/>
</CELL>
</TABLE>
<par/>
<TABLE template="TRNDOC:HeaderLine">
<CELL litid="X0000991" editlevel="0" width="4,2in" line-spacing="0%">
<BR/>
<VAR nr="1">TRADE FINANCE
Import L/C</VAR>
<BR/>
</CELL>
<CELL litid="X0000992" editlevel="0" width="2,8in" line-spacing="100%">
<VAR nr="2">Clerk: DOKA User 2</VAR>
<BR/>
</CELL>
</TABLE>
<par/>
</header-content>
<footer>
<footer-content name="page"/>
<footer-content name="page">
<TABLE template="TRNDOC:signat">
<CELL litid="XI000675" editlevel="0" width="2,39in" first-indent="0,00in" left-indent="0,00in" right-indent="0,01in" left-margin="0,00in" top-margin="0,00in" right-margin="0,00in" bottom-margin="0,00in" line-spacing="100%" fontname="Arial" fontsize="8pt">
<VAR nr="1"></VAR>
<BR/>
<BR/>
</CELL>
<CELL litid="XI000676" editlevel="0" width="3,59in" line-spacing="100%" fontsize="8pt">
<VAR nr="2">Trx 00000323/DO2</VAR>
<BR/>
</CELL>
<CELL litid="XI000677" editlevel="0" width="1,42in" line-spacing="100%" fontsize="8pt">Page <PAGEFUNC type="#"/>/<PAGEFUNC type="#t"/><BR/></CELL>
</TABLE>
<par/>
</footer-content>
<body>
<TABLE template="DOCEOT:classtrx">
<CELL editlevel="0" width="2,15in" line-spacing="0%" fontsize="10pt" litid="X0000002">
<B>
<VAR nr="1"></VAR>
<BR/>
</B>
</CELL>
<CELL width="4,54in" line-spacing="100%" litid="X0000003">
<VAR nr="2">00000323</VAR>
<BR/>
</CELL>
</TABLE>
<par/>
<BLOCK template="TRNDOC:emptyline" litid="X0000940" editlevel="0" keep-with-previous="true" widows="3" line-spacing="0%"> <BR/></BLOCK>
<par/>
<BLOCK template="DOCEOT:adrlin" litid="XI000008" editlevel="0" line-spacing="100%" fontsize="10pt">
<VAR nr="1">Export Corporation</VAR>
<BR/>
</BLOCK>
<par/>
<BLOCK template="DOCEOT:adrlin" litid="XI000008" editlevel="0" line-spacing="100%" fontsize="10pt">
<VAR nr="1">Churchstreet 172</VAR>
<BR/>
</BLOCK>
<par/>
<BLOCK template="DOCEOT:adrlin" litid="XI000008" editlevel="0" line-spacing="100%" fontsize="10pt">
<VAR nr="1">Hong Kong</VAR>
<BR/>
</BLOCK>
<par/>
<BLOCK template="TRNDOC:emptyline" litid="X0000940" editlevel="0" keep-with-previous="true" widows="3" line-spacing="0%"> <BR/></BLOCK>
<par/>
<BLOCK template="TRNDOC:LineBold" litid="X0000930" editlevel="0" line-spacing="0%">
<B>
<VAR nr="1">Order confirmation</VAR>
<BR/>
</B>
</BLOCK>
<par/>
<TABLE template="TRNDOC:RefLine">
<CELL litid="X0000933" editlevel="0" width="1,68in" first-indent="0,00in" left-indent="0,00in" right-indent="0,01in" line-spacing="0%">
<VAR nr="1">Letter of Credit Number</VAR>:<BR/></CELL>
<CELL litid="X0000934" width="0,11in" line-spacing="100%">
<BR/>
</CELL>
<CELL litid="X0000935" width="4,90in" line-spacing="100%">
<VAR nr="2">LI06-00001</VAR>
<BR/>
</CELL>
</TABLE>
<par/>
<TABLE template="TRNDOC:RefLine">
<CELL litid="X0000933" editlevel="0" width="1,68in" first-indent="0,00in" left-indent="0,00in" right-indent="0,01in" line-spacing="0%">
<VAR nr="1">Tolerance</VAR>:<BR/></CELL>
<CELL litid="X0000934" width="0,11in" line-spacing="100%">
<BR/>
</CELL>
<CELL litid="X0000935" width="4,90in" line-spacing="100%">
<VAR nr="2">+ 10 % / - 10 %</VAR>
<BR/>
</CELL>
</TABLE>
<BLOCK template="TRNDOC:emptyline" litid="X0000940" editlevel="0" keep-with-previous="true" widows="3" line-spacing="0%"> <BR/></BLOCK>
<par/>
<BLOCK template="LITOPN:introAPL" litid="XI000327" editlevel="0" width="6,69in" line-spacing="0%">According to your instructions we have issued our documentary credit mentioned below. <VAR nr="1"></VAR><BR/><BR/>We have issued this <VAR nr="2">irrevocable </VAR> documentary credit <VAR nr="6">in paper version</VAR>, which is available with <VAR nr="3">Hong Kong Trade Bank </VAR><VAR nr="4">by acceptance </VAR> <VAR nr="5">of beneficiaries draft(s) drawn on Hong Kong Trade Bank and </VAR>against presentation of the documents detailed herein.<BR/></BLOCK>
<par/>
<TABLE template="LITDOC:detailline">
<CELL editlevel="0" width="2,05in" line-spacing="100%" litid="XI000307">
<VAR nr="1">Form of L/C:</VAR>
<BR/>
</CELL>
<CELL editlevel="0" width="4,40in" line-spacing="100%" litid="XI000308">
<VAR nr="2">IRREVOCABLE</VAR>
<BR/>
</CELL>
</TABLE>
<par/>
<TABLE template="LITDOC:detailline">
<CELL editlevel="0" width="2,05in" line-spacing="100%" litid="XI000307">
<VAR nr="1">Issued on:</VAR>
<BR/>
</CELL>
<CELL editlevel="0" width="4,40in" line-spacing="100%" litid="XI000308">
<VAR nr="2">01. March 2006</VAR>
<BR/>
</CELL>
</TABLE>
<par/>
<BLOCK template="LITDOC:printit" line-spacing="0%" litid="XI000331">
<VAR nr="1"></VAR>
<BR/>
</BLOCK>
<par/>
<BLOCK template="LITDOC:printit" line-spacing="0%" litid="XI000331">
<VAR nr="1"></VAR>
<BR/>
</BLOCK>
<par/>
<BLOCK template="LITDOC:printit" line-spacing="0%" litid="XI000331">
<VAR nr="1">Additional Conditions:</VAR>
<BR/>
</BLOCK>
<par/>
<TABLE template="LITDOC:detailline">
<CELL editlevel="0" width="2,05in" line-spacing="100%" litid="XI000307">
<VAR nr="1">Details of Charges:</VAR>
<BR/>
</CELL>
</TABLE>
<par/>
<TABLE template="LITDOC:detailline">
<CELL editlevel="0" width="2,05in" line-spacing="100%" litid="XI000307">
<VAR nr="1">Confirmation Instructions:</VAR>
<BR/>
</CELL>
<CELL editlevel="0" width="4,40in" line-spacing="100%" litid="XI000308">
<VAR nr="2">CONFIRM</VAR>
<BR/>
</CELL>
</TABLE>
<par/>
<BLOCK template="TRNDOC:emptyline" litid="X0000940" editlevel="0" keep-with-previous="true" widows="3" line-spacing="0%"> <BR/></BLOCK>
<par/>
<BLOCK template="LITDOC:examination" litid="XI000302" editlevel="0" line-spacing="0%">In the case of non- or part-utilisation of documentary credit we reserve the right to charge you with the commissions of the advising bank.<BR/><BR/>In addition of our General Business Conditions of our Bank shall apply, which you might have insight at in our Bank or might be sent to you on request.<BR/><BR/>We kindly ask you to compare the terms of the documentary credit with your order immediately upon receipt of this message and in the event of discrepancies to telephone us without further delay. Failure to lodge a complaint by telephone will be construed as approval.<BR/></BLOCK>
<par/>
</body>
</document>