﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-ljf2999-文章分类-JDOM.DOM</title><link>http://www.blogjava.net/ljf2999/category/17898.html</link><description /><language>zh-cn</language><lastBuildDate>Fri, 02 Mar 2007 06:47:29 GMT</lastBuildDate><pubDate>Fri, 02 Mar 2007 06:47:29 GMT</pubDate><ttl>60</ttl><item><title>JDOM:test1.1</title><link>http://www.blogjava.net/ljf2999/articles/85346.html</link><dc:creator>ljf2999</dc:creator><author>ljf2999</author><pubDate>Mon, 04 Dec 2006 06:16:00 GMT</pubDate><guid>http://www.blogjava.net/ljf2999/articles/85346.html</guid><wfw:comment>http://www.blogjava.net/ljf2999/comments/85346.html</wfw:comment><comments>http://www.blogjava.net/ljf2999/articles/85346.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/ljf2999/comments/commentRss/85346.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/ljf2999/services/trackbacks/85346.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 1												/**/										/*																										  2														 * NewJFrame.java						  3														 *						  4														 * Created on December 1, 200...&nbsp;&nbsp;<a href='http://www.blogjava.net/ljf2999/articles/85346.html'>阅读全文</a><img src ="http://www.blogjava.net/ljf2999/aggbug/85346.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/ljf2999/" target="_blank">ljf2999</a> 2006-12-04 14:16 <a href="http://www.blogjava.net/ljf2999/articles/85346.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JDOM:test1.0(NetBeans5.5)</title><link>http://www.blogjava.net/ljf2999/articles/84875.html</link><dc:creator>ljf2999</dc:creator><author>ljf2999</author><pubDate>Fri, 01 Dec 2006 08:07:00 GMT</pubDate><guid>http://www.blogjava.net/ljf2999/articles/84875.html</guid><wfw:comment>http://www.blogjava.net/ljf2999/comments/84875.html</wfw:comment><comments>http://www.blogjava.net/ljf2999/articles/84875.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/ljf2999/comments/commentRss/84875.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/ljf2999/services/trackbacks/84875.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 1												/**/										/*																										  2														 * NewJFrame.java						  3														 *						  4														 * Created on December 1, 200...&nbsp;&nbsp;<a href='http://www.blogjava.net/ljf2999/articles/84875.html'>阅读全文</a><img src ="http://www.blogjava.net/ljf2999/aggbug/84875.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/ljf2999/" target="_blank">ljf2999</a> 2006-12-01 16:07 <a href="http://www.blogjava.net/ljf2999/articles/84875.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>DOM:write xml</title><link>http://www.blogjava.net/ljf2999/articles/84550.html</link><dc:creator>ljf2999</dc:creator><author>ljf2999</author><pubDate>Thu, 30 Nov 2006 06:40:00 GMT</pubDate><guid>http://www.blogjava.net/ljf2999/articles/84550.html</guid><wfw:comment>http://www.blogjava.net/ljf2999/comments/84550.html</wfw:comment><comments>http://www.blogjava.net/ljf2999/articles/84550.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/ljf2999/comments/commentRss/84550.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/ljf2999/services/trackbacks/84550.html</trackback:ping><description><![CDATA[
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<span style="COLOR: #008080"> 1</span>
				<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #0000ff">import</span>
				<span style="COLOR: #000000"> org.w3c.dom.</span>
				<span style="COLOR: #000000">*</span>
				<span style="COLOR: #000000">;<br /></span>
				<span style="COLOR: #008080"> 2</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">import</span>
				<span style="COLOR: #000000"> javax.xml.parsers.</span>
				<span style="COLOR: #000000">*</span>
				<span style="COLOR: #000000">;<br /></span>
				<span style="COLOR: #008080"> 3</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">import</span>
				<span style="COLOR: #000000"> javax.xml.transform.</span>
				<span style="COLOR: #000000">*</span>
				<span style="COLOR: #000000">;<br /></span>
				<span style="COLOR: #008080"> 4</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">import</span>
				<span style="COLOR: #000000"> javax.xml.transform.dom.DOMSource;<br /></span>
				<span style="COLOR: #008080"> 5</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">import</span>
				<span style="COLOR: #000000"> javax.xml.transform.stream.StreamResult;<br /></span>
				<span style="COLOR: #008080"> 6</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">import</span>
				<span style="COLOR: #000000"> java.io.</span>
				<span style="COLOR: #000000">*</span>
				<span style="COLOR: #000000">;<br /></span>
				<span style="COLOR: #008080"> 7</span>
				<span style="COLOR: #000000">
						<img id="Codehighlighter1_210_2159_Open_Image" onclick="this.style.display='none'; Codehighlighter1_210_2159_Open_Text.style.display='none'; Codehighlighter1_210_2159_Closed_Image.style.display='inline'; Codehighlighter1_210_2159_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
						<img id="Codehighlighter1_210_2159_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_210_2159_Closed_Text.style.display='none'; Codehighlighter1_210_2159_Open_Image.style.display='inline'; Codehighlighter1_210_2159_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">class</span>
				<span style="COLOR: #000000"> writexml </span>
				<span id="Codehighlighter1_210_2159_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.blogjava.net/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_210_2159_Open_Text">
						<span style="COLOR: #000000">{<br /></span>
						<span style="COLOR: #008080"> 8</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">private</span>
						<span style="COLOR: #000000"> Document document;<br /></span>
						<span style="COLOR: #008080"> 9</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">private</span>
						<span style="COLOR: #000000"> String filename;<br /></span>
						<span style="COLOR: #008080">10</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    <br /></span>
						<span style="COLOR: #008080">11</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_345_553_Open_Image" onclick="this.style.display='none'; Codehighlighter1_345_553_Open_Text.style.display='none'; Codehighlighter1_345_553_Closed_Image.style.display='inline'; Codehighlighter1_345_553_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
								<img id="Codehighlighter1_345_553_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_345_553_Closed_Text.style.display='none'; Codehighlighter1_345_553_Open_Image.style.display='inline'; Codehighlighter1_345_553_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">public</span>
						<span style="COLOR: #000000"> writexml(String name) </span>
						<span style="COLOR: #0000ff">throws</span>
						<span style="COLOR: #000000"> ParserConfigurationException</span>
						<span id="Codehighlighter1_345_553_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_345_553_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080">12</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        filename</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">name;<br /></span>
								<span style="COLOR: #008080">13</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        DocumentBuilderFactory factory</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">DocumentBuilderFactory.newInstance();<br /></span>
								<span style="COLOR: #008080">14</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        DocumentBuilder builder</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">factory.newDocumentBuilder();<br /></span>
								<span style="COLOR: #008080">15</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        document</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">builder.newDocument();<br /></span>
								<span style="COLOR: #008080">16</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #008080">17</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_611_1018_Open_Image" onclick="this.style.display='none'; Codehighlighter1_611_1018_Open_Text.style.display='none'; Codehighlighter1_611_1018_Closed_Image.style.display='inline'; Codehighlighter1_611_1018_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
								<img id="Codehighlighter1_611_1018_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_611_1018_Closed_Text.style.display='none'; Codehighlighter1_611_1018_Open_Image.style.display='inline'; Codehighlighter1_611_1018_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">public</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> toWrite(String mytitle,String mycontent)</span>
						<span id="Codehighlighter1_611_1018_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_611_1018_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080">18</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        Element root</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">document.createElement(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">WorkShop</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">);<br /></span>
								<span style="COLOR: #008080">19</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        document.appendChild(root);<br /></span>
								<span style="COLOR: #008080">20</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        Element title</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">document.createElement(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Title</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">);<br /></span>
								<span style="COLOR: #008080">21</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        title.appendChild(document.createTextNode(mytitle));<br /></span>
								<span style="COLOR: #008080">22</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        root.appendChild(title);<br /></span>
								<span style="COLOR: #008080">23</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        Element content</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">document.createElement(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Content</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">);<br /></span>
								<span style="COLOR: #008080">24</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        content.appendChild(document.createTextNode(mycontent));<br /></span>
								<span style="COLOR: #008080">25</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        root.appendChild(content);<br /></span>
								<span style="COLOR: #008080">26</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #008080">27</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_1044_1720_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1044_1720_Open_Text.style.display='none'; Codehighlighter1_1044_1720_Closed_Image.style.display='inline'; Codehighlighter1_1044_1720_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
								<img id="Codehighlighter1_1044_1720_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1044_1720_Closed_Text.style.display='none'; Codehighlighter1_1044_1720_Open_Image.style.display='inline'; Codehighlighter1_1044_1720_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">public</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> toSave()</span>
						<span id="Codehighlighter1_1044_1720_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_1044_1720_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080">28</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_1057_1567_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1057_1567_Open_Text.style.display='none'; Codehighlighter1_1057_1567_Closed_Image.style.display='inline'; Codehighlighter1_1057_1567_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_1057_1567_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1057_1567_Closed_Text.style.display='none'; Codehighlighter1_1057_1567_Open_Image.style.display='inline'; Codehighlighter1_1057_1567_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">try</span>
								<span id="Codehighlighter1_1057_1567_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_1057_1567_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">29</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            TransformerFactory tf</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000">TransformerFactory.newInstance();<br /></span>
										<span style="COLOR: #008080">30</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            Transformer transformer</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000">tf.newTransformer();<br /></span>
										<span style="COLOR: #008080">31</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            DOMSource source</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> DOMSource(document);<br /></span>
										<span style="COLOR: #008080">32</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            transformer.setOutputProperty(OutputKeys.ENCODING,</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">GB2312</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080">33</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            transformer.setOutputProperty(OutputKeys.INDENT,</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">yes</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080">34</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            PrintWriter pw</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> PrintWriter(</span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> FileOutputStream(filename));<br /></span>
										<span style="COLOR: #008080">35</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            StreamResult result</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> StreamResult(pw);<br /></span>
										<span style="COLOR: #008080">36</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            transformer.transform(source,result);<br /></span>
										<span style="COLOR: #008080">37</span>
										<span style="COLOR: #000000">
												<img id="Codehighlighter1_1600_1645_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1600_1645_Open_Text.style.display='none'; Codehighlighter1_1600_1645_Closed_Image.style.display='inline'; Codehighlighter1_1600_1645_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_1600_1645_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1600_1645_Closed_Text.style.display='none'; Codehighlighter1_1600_1645_Open_Image.style.display='inline'; Codehighlighter1_1600_1645_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">catch</span>
								<span style="COLOR: #000000">(TransformerException mye)</span>
								<span id="Codehighlighter1_1600_1645_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_1600_1645_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">38</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            mye.printStackTrace();<br /></span>
										<span style="COLOR: #008080">39</span>
										<span style="COLOR: #000000">
												<img id="Codehighlighter1_1669_1714_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1669_1714_Open_Text.style.display='none'; Codehighlighter1_1669_1714_Closed_Image.style.display='inline'; Codehighlighter1_1669_1714_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_1669_1714_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1669_1714_Closed_Text.style.display='none'; Codehighlighter1_1669_1714_Open_Image.style.display='inline'; Codehighlighter1_1669_1714_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">catch</span>
								<span style="COLOR: #000000">(IOException exp)</span>
								<span id="Codehighlighter1_1669_1714_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_1669_1714_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">40</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            exp.printStackTrace();<br /></span>
										<span style="COLOR: #008080">41</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">42</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #008080">43</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_1764_2157_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1764_2157_Open_Text.style.display='none'; Codehighlighter1_1764_2157_Closed_Image.style.display='inline'; Codehighlighter1_1764_2157_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
								<img id="Codehighlighter1_1764_2157_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1764_2157_Closed_Text.style.display='none'; Codehighlighter1_1764_2157_Open_Image.style.display='inline'; Codehighlighter1_1764_2157_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">public</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">static</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> main(String args[])</span>
						<span id="Codehighlighter1_1764_2157_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_1764_2157_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080">44</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_1777_2008_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1777_2008_Open_Text.style.display='none'; Codehighlighter1_1777_2008_Closed_Image.style.display='inline'; Codehighlighter1_1777_2008_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_1777_2008_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1777_2008_Closed_Text.style.display='none'; Codehighlighter1_1777_2008_Open_Image.style.display='inline'; Codehighlighter1_1777_2008_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">try</span>
								<span id="Codehighlighter1_1777_2008_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_1777_2008_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">45</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            writexml myxml</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> writexml(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">d:\\training\\myxx\\src\\xml\\9.xml</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080">46</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            myxml.toWrite(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">????</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">????</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080">47</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            myxml.toSave();<br /></span>
										<span style="COLOR: #008080">48</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            System.out.print(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">Your writing is successful.</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080">49</span>
										<span style="COLOR: #000000">
												<img id="Codehighlighter1_2049_2151_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2049_2151_Open_Text.style.display='none'; Codehighlighter1_2049_2151_Closed_Image.style.display='inline'; Codehighlighter1_2049_2151_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_2049_2151_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_2049_2151_Closed_Text.style.display='none'; Codehighlighter1_2049_2151_Open_Image.style.display='inline'; Codehighlighter1_2049_2151_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">catch</span>
								<span style="COLOR: #000000">(ParserConfigurationException exp)</span>
								<span id="Codehighlighter1_2049_2151_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_2049_2151_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">50</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            exp.printStackTrace();<br /></span>
										<span style="COLOR: #008080">51</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            System.out.print(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">Your writing is failed.</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080">52</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">53</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #008080">54</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">55</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
		</div>
<img src ="http://www.blogjava.net/ljf2999/aggbug/84550.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/ljf2999/" target="_blank">ljf2999</a> 2006-11-30 14:40 <a href="http://www.blogjava.net/ljf2999/articles/84550.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>DOM:parse and print XML document</title><link>http://www.blogjava.net/ljf2999/articles/84549.html</link><dc:creator>ljf2999</dc:creator><author>ljf2999</author><pubDate>Thu, 30 Nov 2006 06:38:00 GMT</pubDate><guid>http://www.blogjava.net/ljf2999/articles/84549.html</guid><wfw:comment>http://www.blogjava.net/ljf2999/comments/84549.html</wfw:comment><comments>http://www.blogjava.net/ljf2999/articles/84549.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/ljf2999/comments/commentRss/84549.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/ljf2999/services/trackbacks/84549.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 1								package				 doms;				  2																								  3																		import				 javax.xml.parsers.				*				; 				//				这个包被包括在j2ee 1.4.2 API中。									...&nbsp;&nbsp;<a href='http://www.blogjava.net/ljf2999/articles/84549.html'>阅读全文</a><img src ="http://www.blogjava.net/ljf2999/aggbug/84549.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/ljf2999/" target="_blank">ljf2999</a> 2006-11-30 14:38 <a href="http://www.blogjava.net/ljf2999/articles/84549.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>