2011-04-01 49 views
13

我有一個格式化的XML文件,我想將其轉換爲一行字符串,我該怎麼做。Java:將格式化的xml文件轉換爲一行字符串

示例XML:

<?xml version="1.0" encoding="UTF-8"?> 
<books> 
    <book> 
     <title>Basic XML</title> 
     <price>100</price> 
     <qty>5</qty> 
    </book> 
    <book> 
    <title>Basic Java</title> 
    <price>200</price> 
    <qty>15</qty> 
    </book> 
</books> 

預計輸出

<?xml version="1.0" encoding="UTF-8"?><books><book> <title>Basic XML</title><price>100</price><qty>5</qty></book><book><title>Basic Java</title><price>200</price><qty>15</qty></book></books> 

在此先感謝。

+4

這不應該是必要的。你爲什麼需要這個? – Tomalak 2011-04-01 08:57:35

+0

@Tomalak我需要將它作爲輸入傳遞給cgi,並且cgi只接受單線形式的xml。 – Ianthe 2011-04-04 14:32:03

+0

@所有,非常感謝所有的答案 – Ianthe 2011-04-04 14:34:55

回答

34
//filename is filepath string 
BufferedReader br = new BufferedReader(new FileReader(new File(filename))); 
String line; 
StringBuilder sb = new StringBuilder(); 

while((line=br.readLine())!= null){ 
    sb.append(line.trim()); 
} 

使用StringBuilder的是更有效的則的concat http://kaioa.com/node/59

+0

這不會刪除前/後空格,不是? – 2011-04-01 09:05:54

+0

@Ocaso Protal現在將 – ant 2011-04-01 09:14:47

+0

現在你得到我的+1 – 2011-04-01 09:16:05

4

打開並讀取文件。

Reader r = new BufferedReader(filename); 
String ret = ""; 
while((String s = r.nextLine()!=null)) 
{ 
    ret+=s; 
} 
return ret; 
+0

ret + = s :((不這樣做,更好地使用StringBuffer – smas 2011-04-01 08:55:31

+0

@smas:P它不是真正的代碼,我仍然沒有想出正確的格式所以我採用了最簡潔的方式,這個想法仍然成立(如果你導入相關的庫,設置像'filename'這樣的變量,並設置try {try {} catch {}'塊) – bdares 2011-04-01 08:58:00

+0

你也可以做's.trim()'去除每行上的前導/尾部空格... – romaintaz 2011-04-01 08:59:50

6
// 1. Read xml from file to StringBuilder (StringBuffer) 
// 2. call s = stringBuffer.toString() 
// 3. remove all "\n" and "\t": 
s.replaceAll("\n",""); 
s.replaceAll("\t",""); 

編輯:

我犯了一個小錯誤,最好是在你的情況下使用StringBuilder(我想你不需要線程安全的StringBuffer)

+2

如果內容元素之間存在空格,例如 foo(換行)吧? – 2011-04-01 08:56:33

+0

雙空格,看看預期結果,我們有例如 - 書後空間。我不認爲@sprenna想用空格做些事情。 – <span class="text-secondary"> <small> <a rel="noopener" target="_blank" href="https://stackoverflow.com/users/574799/">smas</a></span> <span>2011-04-01 09:03:20</span> </small> </span> </p> </div> </div> </div> <div itemprop="comment" class="post-comment"> <div class="row"> <div class="col-lg-1"><span class="text-secondary">+0</span></div> <div class="col-lg-11"> <p class="commenttext">它看起來像是一個錯誤在這個例子中,b/c其他<book><title>組合之間沒有空格,在 – <span class="text-secondary"> <small> <span>2011-04-01 09:12:01</span> </small> </span> </p> </div> </div> </div> </div> </div> </article> <article class="board-top-1 padding-top-10"> <div class="post-col vote-info"> <span class="count">1<i class="fa fa-thumbs-up"></i></span> </div> <div class="post-offset"> <div class="answer fmt"> <p>我猜你想閱讀,忽略空格,然後再寫出來。大多數XML包可以選擇忽略空白。例如,DocumentBuilderFactory爲此具有<a href="http://setIgnoringElementContentWhitespace" rel="nofollow">setIgnoringElementContentWhitespace</a>。</p> <p>同樣如果通過編組對象生成XML然後JAXB具有<a href="http://ws.apache.org/jaxme/apidocs/javax/xml/bind/Marshaller.html" rel="nofollow">JAXB_FORMATTED_OUTPUT</a></p> </div> <div class="post-info"> <div class="post-meta row"> <p class="text-secondary col-lg-6"> <span class="source"> <a rel="noopener" target="_blank" href="https://stackoverflow.com/q/5511163">來源</a> </span> </p> <p class="text-secondary col-lg-6"> <span class="float-right date"> <span>2011-04-01 08:55:48</span> </p> <p class="col-12"></p> <p class="col-12"></p></div> </div> </div> </article> <div> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-6208739752673518" data-ad-slot="1038284119" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <article class="board-top-1 padding-top-10"> <div class="post-col vote-info"> <span class="count">4<i class="fa fa-thumbs-up"></i></span> </div> <div class="post-offset"> <div class="answer fmt"> <p>與<a href="https://www.w3schools.com/xml/ref_xsl_el_output.asp" rel="nofollow noreferrer"><code class="prettyprint-override"><xsl:output indent="no"></code></a>運行它通過XSLT <a href="http://en.wikipedia.org/wiki/Identity_transform" rel="nofollow noreferrer">identity transform</a>和<a href="https://www.w3schools.com/xml/ref_xsl_el_strip-space.asp" rel="nofollow noreferrer"><code class="prettyprint-override"><xsl:strip-space elements="*"/></code></a></p> <pre><code class="prettyprint-override"><?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="no" /> <xsl:strip-space elements="*"/> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> </code></pre> <p>它將刪除任何t他不重要的空白,併產生您發佈的預期輸出。</p> </div> <div class="post-info"> <div class="post-meta row"> <p class="text-secondary col-lg-6"> <span class="source"> <a rel="noopener" target="_blank" href="https://stackoverflow.com/q/5512930">來源</a> </span> </p> <p class="text-secondary col-lg-6"> <span class="float-right date"> <span>2011-04-01 11:49:45</span> </p> <p class="col-12"></p> <p class="col-12"></p></div> </div> <!-- comments --> <div class="comments"> <div itemprop="comment" class="post-comment"> <div class="row"> <div class="col-lg-1"><span class="text-secondary">+0</span></div> <div class="col-lg-11"> <p class="commenttext">這似乎是一種很好的方式,但您沒有提到如何在Java中運行此XSLT? – <span class="text-secondary"> <small> <span>2018-02-19 06:49:03</span> </small> </span> </p> </div> </div> </div> <div itemprop="comment" class="post-comment"> <div class="row"> <div class="col-lg-1"><span class="text-secondary">+0</span></div> <div class="col-lg-11"> <p class="commenttext">[用Java處理XSLT](https://stackoverflow.com/a/6438729/725306) – <span class="text-secondary"> <small> <span>2018-02-19 07:18:45</span> </small> </span> </p> </div> </div> </div> </div> </div> </article> <article class="board-top-1 padding-top-10"> <div class="post-col vote-info"> <span class="count">2<i class="fa fa-thumbs-up"></i></span> </div> <div class="post-offset"> <div class="answer fmt"> <p><a href="https://stackoverflow.com/questions/139076/how-to-pretty-print-xml-from-java/260314#260314">Using this answer which provides the code to use Dom4j to do pretty-printing</a>,更改從設置輸出格式的行:<code class="prettyprint-override">createPrettyPrint()</code>到:<code class="prettyprint-override">createCompactFormat()</code></p> <pre><code class="prettyprint-override">public String unPrettyPrint(final String xml){ if (StringUtils.isBlank(xml)) { throw new RuntimeException("xml was null or blank in unPrettyPrint()"); } final StringWriter sw; try { final OutputFormat format = OutputFormat.createCompactFormat(); final org.dom4j.Document document = DocumentHelper.parseText(xml); sw = new StringWriter(); final XMLWriter writer = new XMLWriter(sw, format); writer.write(document); } catch (Exception e) { throw new RuntimeException("Error un-pretty printing xml:\n" + xml, e); } return sw.toString(); } </code></pre> </div> <div class="post-info"> <div class="post-meta row"> <p class="text-secondary col-lg-6"> <span class="source"> <a rel="noopener" target="_blank" href="https://stackoverflow.com/q/5513015">來源</a> </span> </p> <p class="text-secondary col-lg-6"> <span class="float-right date"> <span>2011-04-01 11:57:26</span> </p> <p class="col-12"></p> <p class="col-12"></p></div> </div> <!-- comments --> <div class="comments"> <div itemprop="comment" class="post-comment"> <div class="row"> <div class="col-lg-1"><span class="text-secondary">+0</span></div> <div class="col-lg-11"> <p class="commenttext">對我來說很完美。謝謝 – <span class="text-secondary"> <small> <a rel="noopener" target="_blank" href="https://stackoverflow.com/users/727495/">vkrams</a></span> <span>2017-03-23 22:56:42</span> </small> </span> </p> </div> </div> </div> </div> </div> </article> <article class="board-top-1 padding-top-10"> <div class="post-col vote-info"> <span class="count">-1<i class="fa fa-thumbs-up"></i></span> </div> <div class="post-offset"> <div class="answer fmt"> <pre><code class="prettyprint-override">FileUtils.readFileToString(fileName); </code></pre> <p><a href="http://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/FileUtils.html" rel="nofollow">link</a></p> </div> <div class="post-info"> <div class="post-meta row"> <p class="text-secondary col-lg-6"> <span class="source"> <a rel="noopener" target="_blank" href="https://stackoverflow.com/q/18473716">來源</a> </span> </p> <p class="text-secondary col-lg-6"> <span class="float-right date"> <span>2013-08-27 19:17:20</span> </p> <p class="col-12"></p> <p class="col-12"></p></div> </div> <!-- comments --> <div class="comments"> <div itemprop="comment" class="post-comment"> <div class="row"> <div class="col-lg-1"><span class="text-secondary">+0</span></div> <div class="col-lg-11"> <p class="commenttext">該鏈接甚至規定該方法已折舊。當使用trim進行簡單的緩衝區讀取就足夠了時,我不會推薦使用這種方法 – <span class="text-secondary"> <small> <a rel="noopener" target="_blank" href="https://stackoverflow.com/users/804773/">Grambot</a></span> <span>2013-08-27 19:39:33</span> </small> </span> </p> </div> </div> </div> </div> </div> </article> <div> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-6208739752673518" data-ad-slot="1038284119" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <article class="board-top-1 padding-top-10"> <div class="post-col vote-info"> <span class="count">1<i class="fa fa-thumbs-up"></i></span> </div> <div class="post-offset"> <div class="answer fmt"> <p>如果壓縮XML文檔中的所有空白上述解決方案的工作。在輸出XML文檔時,其他快速選項是JDOM(使用Format.getCompactFormat())和dom4j(使用OutputFormat.createCompactFormat())。</p> <p>但是,我有一個獨特的要求來保留元素的文本值中包含的空白,並且這些解決方案沒有按我的需要工作。我所需要的只是刪除添加到XML文檔中的'漂亮'格式。</p> <p>我想出的解決方案可以在下面的3步/正則表達式過程中解釋...爲了理解解決方案的算法。</p> <pre><code class="prettyprint-override">String regex, updatedXml; // 1. remove all white space preceding a begin element tag: regex = "[\\n\\s]+(\\<[^/])"; updatedXml = originalXmlStr.replaceAll(regex, "$1"); // 2. remove all white space following an end element tag: regex = "(\\</[a-zA-Z0-9-_\\.:]+\\>)[\\s]+"; updatedXml = updatedXml.replaceAll(regex, "$1"); // 3. remove all white space following an empty element tag // (<some-element xmlns:attr1="some-value".... />): regex = "(/\\>)[\\s]+"; updatedXml = updatedXml.replaceAll(regex, "$1"); </code></pre> <p>注:僞代碼是Java ...的「$ 1」是替換字符串這是第一個捕獲組。</p> <p>這將簡單地刪除將'漂亮打印'格式添加到XML文檔時使用的空白區域,但在元素文本值的一部分時保留所有其他空白區域。</p> </div> <div class="post-info"> <div class="post-meta row"> <p class="text-secondary col-lg-6"> <span class="source"> <a rel="noopener" target="_blank" href="https://stackoverflow.com/q/38727096">來源</a> </span> </p> <p class="text-secondary col-lg-6"> <span class="float-right date"> <span>2016-08-02 17:39:46</span> <a rel="noopener" target="_blank" href="https://stackoverflow.com/users/1113792/">user1113792</a></span> </p> <p class="col-12"></p> <p class="col-12"></p></div> </div> </div> </article> <article class="board-top-1 padding-top-10"> <div class="post-col vote-info"> <span class="count">1<i class="fa fa-thumbs-up"></i></span> </div> <div class="post-offset"> <div class="answer fmt"> <p>在java中1.8及以上</p> <pre><code class="prettyprint-override">BufferedReader br = new BufferedReader(new FileReader(filePath)); String content = br.lines().collect(Collectors.joining("\n")); </code></pre> </div> <div class="post-info"> <div class="post-meta row"> <p class="text-secondary col-lg-6"> <span class="source"> <a rel="noopener" target="_blank" href="https://stackoverflow.com/q/45235040">來源</a> </span> </p> <p class="text-secondary col-lg-6"> <span class="float-right date"> <span>2017-07-21 10:14:47</span> </p> <p class="col-12"></p> <p class="col-12"></p></div> </div> </div> </article> </div> <div class="clearfix"> </div> <div class="relative-box"> <div class="relative">相關問題</div> <ul class="relative_list"> <li> 1. <a href="http://hk.uwenku.com/question/p-zonycywl-bhz.html" target="_blank" title="將字符串轉換爲XML文件"> 將字符串轉換爲XML文件 </a> </li> <li> 2. <a href="http://hk.uwenku.com/question/p-onngflma-bhy.html" target="_blank" title="將字符串轉換爲xml文件?"> 將字符串轉換爲xml文件? </a> </li> <li> 3. <a href="http://hk.uwenku.com/question/p-shwvdnqz-cv.html" target="_blank" title="將格式化的字符串轉換爲Java中的HTML"> 將格式化的字符串轉換爲Java中的HTML </a> </li> <li> 4. <a href="http://hk.uwenku.com/question/p-gdhtyqza-m.html" target="_blank" title="將.net格式的字符串轉換爲java格式的字符串"> 將.net格式的字符串轉換爲java格式的字符串 </a> </li> <li> 5. <a href="http://hk.uwenku.com/question/p-calvykgr-q.html" target="_blank" title="將HHMM字符串轉換爲Java格式的GMT格式"> 將HHMM字符串轉換爲Java格式的GMT格式 </a> </li> <li> 6. <a href="http://hk.uwenku.com/question/p-nllujenp-dz.html" target="_blank" title="如何將字符串轉換爲java中的xml文件"> 如何將字符串轉換爲java中的xml文件 </a> </li> <li> 7. <a href="http://hk.uwenku.com/question/p-rdwibdud-bnz.html" target="_blank" title="將字符串轉換爲格式爲"> 將字符串轉換爲格式爲 </a> </li> <li> 8. <a href="http://hk.uwenku.com/question/p-kgmeknsa-bny.html" target="_blank" title="Android字符串xml文件格式化"> Android字符串xml文件格式化 </a> </li> <li> 9. <a href="http://hk.uwenku.com/question/p-abtfvpmf-bcd.html" target="_blank" title="將XML文檔轉換爲字符串?"> 將XML文檔轉換爲字符串? </a> </li> <li> 10. <a href="http://hk.uwenku.com/question/p-hqksbjau-bmk.html" target="_blank" title="將散列字符串轉換爲格式化的數字?"> 將散列字符串轉換爲格式化的數字? </a> </li> <div> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-6208739752673518" data-ad-slot="4606349252"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <li> 11. <a href="http://hk.uwenku.com/question/p-gndetuur-pv.html" target="_blank" title="將字符串轉換爲SSIS中的可呈現XML格式"> 將字符串轉換爲SSIS中的可呈現XML格式 </a> </li> <li> 12. <a href="http://hk.uwenku.com/question/p-almsufkv-vn.html" target="_blank" title="如何將給定格式的xml字符串轉換爲json?"> 如何將給定格式的xml字符串轉換爲json? </a> </li> <li> 13. <a href="http://hk.uwenku.com/question/p-esbgbera-pw.html" target="_blank" title="如何將XML格式的字符串轉換爲單行XML字符串,而grails/groovy中沒有空格?"> 如何將XML格式的字符串轉換爲單行XML字符串,而grails/groovy中沒有空格? </a> </li> <li> 14. <a href="http://hk.uwenku.com/question/p-kdygmyps-ba.html" target="_blank" title="如何將xml文件轉換爲字符串而不使用java轉義XML"> 如何將xml文件轉換爲字符串而不使用java轉義XML </a> </li> <li> 15. <a href="http://hk.uwenku.com/question/p-qcixcegp-zr.html" target="_blank" title="格式化長字符串轉換爲短字符串C#"> 格式化長字符串轉換爲短字符串C# </a> </li> <li> 16. <a href="http://hk.uwenku.com/question/p-evpchowu-ww.html" target="_blank" title="將字符串轉換爲浮動並將其格式化(C#)"> 將字符串轉換爲浮動並將其格式化(C#) </a> </li> <li> 17. <a href="http://hk.uwenku.com/question/p-autroxhb-zb.html" target="_blank" title="將Jayson的JSON格式化的字符串轉換爲JsonObject"> 將Jayson的JSON格式化的字符串轉換爲JsonObject </a> </li> <li> 18. <a href="http://hk.uwenku.com/question/p-anhndmak-wv.html" target="_blank" title="將格式化的字符串轉換爲Javascript中的整數"> 將格式化的字符串轉換爲Javascript中的整數 </a> </li> <li> 19. <a href="http://hk.uwenku.com/question/p-xmuswmvs-tc.html" target="_blank" title="將數字轉換爲格式化的字符串並再次解析格式化的字符串"> 將數字轉換爲格式化的字符串並再次解析格式化的字符串 </a> </li> <li> 20. <a href="http://hk.uwenku.com/question/p-qwfysfol-ox.html" target="_blank" title="將字符串轉換爲java中的XML文檔"> 將字符串轉換爲java中的XML文檔 </a> </li> <li> 21. <a href="http://hk.uwenku.com/question/p-ynvzrwja-mu.html" target="_blank" title="將字符串數組轉換爲JSON格式的字符串"> 將字符串數組轉換爲JSON格式的字符串 </a> </li> <li> 22. <a href="http://hk.uwenku.com/question/p-bfpndlsi-zo.html" target="_blank" title="將字符串轉換爲SendKeys.Send()格式的字符串"> 將字符串轉換爲SendKeys.Send()格式的字符串 </a> </li> <li> 23. <a href="http://hk.uwenku.com/question/p-fdejihpv-bg.html" target="_blank" title="如何將NSTextView的格式化內容轉換爲字符串"> 如何將NSTextView的格式化內容轉換爲字符串 </a> </li> <li> 24. <a href="http://hk.uwenku.com/question/p-ydiybmur-ms.html" target="_blank" title="如何將「Double」轉換爲VBScript中的格式化字符串"> 如何將「Double」轉換爲VBScript中的格式化字符串 </a> </li> <li> 25. <a href="http://hk.uwenku.com/question/p-pwhlqcfn-rw.html" target="_blank" title="將列表轉換並格式化爲erlang中的字符串"> 將列表轉換並格式化爲erlang中的字符串 </a> </li> <li> 26. <a href="http://hk.uwenku.com/question/p-pixqimvg-bbu.html" target="_blank" title="如何將格式化的字符串轉換爲浮點型?"> 如何將格式化的字符串轉換爲浮點型? </a> </li> <li> 27. <a href="http://hk.uwenku.com/question/p-cwpuhtkc-bae.html" target="_blank" title="幫助將xpath結果轉換爲格式化的字符串"> 幫助將xpath結果轉換爲格式化的字符串 </a> </li> <li> 28. <a href="http://hk.uwenku.com/question/p-shkgcmdi-bt.html" target="_blank" title="如何將NSString轉換爲日期格式化的字符串"> 如何將NSString轉換爲日期格式化的字符串 </a> </li> <li> 29. <a href="http://hk.uwenku.com/question/p-glkagayi-s.html" target="_blank" title="將格式化的字符串轉換爲經度或緯度"> 將格式化的字符串轉換爲經度或緯度 </a> </li> <li> 30. <a href="http://hk.uwenku.com/question/p-bskqpyrq-zc.html" target="_blank" title="將int轉換爲縮短的格式化字符串"> 將int轉換爲縮短的格式化字符串 </a> </li> </ul> </div> <div> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-6208739752673518" data-ad-slot="1575177025"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div class="padding-top-10"></div> </div> </div> <script type="text/javascript" src="http://img.uwenku.com/uwenku/script/side.js?t=1644592048261"></script> <script type="text/javascript" src="http://img.uwenku.com/uwenku/plugin/highlight/highlight.pack.js"></script> <link href="http://img.uwenku.com/uwenku/plugin/highlight/styles/docco.css" media="screen" rel="stylesheet" type="text/css" /> <script type="text/javascript"> $('pre').each(function(i, e) { hljs.highlightBlock(e, "<span class='indent'> </span>", false) }); </script> <div class="col-lg-3 col-md-4 col-sm-5"> <div id="rightTop"> <div class="row"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-6208739752673518" data-ad-slot="5415218910" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div class="row sidebar panel panel-default"> <div class="panel-heading font-bold"> 最新問題 </div> <div class="m-b-sm m-t-sm clearfix"> <ul class="side_article_list"> <li class="side_article_list_item"> 1. <a href="http://hk.uwenku.com/question/p-bacwjvuk-bar.html" target="_blank" title="觸發器在oracle2中相乘兩列"> 觸發器在oracle2中相乘兩列 </a> </li> <li class="side_article_list_item"> 2. <a href="http://hk.uwenku.com/question/p-mikdcmvo-wt.html" target="_blank" title="紅寶石適用看跌數組"> 紅寶石適用看跌數組 </a> </li> <li class="side_article_list_item"> 3. <a href="http://hk.uwenku.com/question/p-ycuwofaj-xg.html" target="_blank" title="如何將目標中生成的內容部署到帶有MSBuild的UWP應用程序中的AppX包中"> 如何將目標中生成的內容部署到帶有MSBuild的UWP應用程序中的AppX包中 </a> </li> <li class="side_article_list_item"> 4. <a href="http://hk.uwenku.com/question/p-pkzsguhh-wz.html" target="_blank" title="SQL Server:CASE和連接字符串"> SQL Server:CASE和連接字符串 </a> </li> <li class="side_article_list_item"> 5. <a href="http://hk.uwenku.com/question/p-nipjwnwn-yy.html" target="_blank" title="爲什麼css網格在IE和Edge中不起作用?"> 爲什麼css網格在IE和Edge中不起作用? </a> </li> <li class="side_article_list_item"> 6. <a href="http://hk.uwenku.com/question/p-nqufrtsz-ze.html" target="_blank" title="保持html頁面內svg的大小"> 保持html頁面內svg的大小 </a> </li> <li class="side_article_list_item"> 7. <a href="http://hk.uwenku.com/question/p-ybfrlzqz-xw.html" target="_blank" title="在R中設置kmeans的靜態中心"> 在R中設置kmeans的靜態中心 </a> </li> <li class="side_article_list_item"> 8. <a href="http://hk.uwenku.com/question/p-obibwibz-xp.html" target="_blank" title="我怎樣才能在沒有警告的情況下設置一個很長的長號碼?"> 我怎樣才能在沒有警告的情況下設置一個很長的長號碼? </a> </li> <li class="side_article_list_item"> 9. <a href="http://hk.uwenku.com/question/p-fmboewhr-yc.html" target="_blank" title="如何更改jSpinners的ArrayList中的值?"> 如何更改jSpinners的ArrayList中的值? </a> </li> <li class="side_article_list_item"> 10. <a href="http://hk.uwenku.com/question/p-ryzljqmv-wn.html" target="_blank" title="提取數據"> 提取數據 </a> </li> </ul> </div> </div> </div> <p class="article-nav-bar"></p> <div class="row sidebar article-nav"> <div class="row box_white visible-sm visible-md visible-lg margin-zero"> <div class="top"> <h3 class="title"><i class="glyphicon glyphicon-th-list"></i> 相關問題</h3> </div> <div class="article-relative-content"> <ul class="side_article_list"> <li class="side_article_list_item"> 1. <a href="http://hk.uwenku.com/question/p-zonycywl-bhz.html" target="_blank" title="將字符串轉換爲XML文件"> 將字符串轉換爲XML文件 </a> </li> <li class="side_article_list_item"> 2. <a href="http://hk.uwenku.com/question/p-onngflma-bhy.html" target="_blank" title="將字符串轉換爲xml文件?"> 將字符串轉換爲xml文件? </a> </li> <li class="side_article_list_item"> 3. <a href="http://hk.uwenku.com/question/p-shwvdnqz-cv.html" target="_blank" title="將格式化的字符串轉換爲Java中的HTML"> 將格式化的字符串轉換爲Java中的HTML </a> </li> <li class="side_article_list_item"> 4. <a href="http://hk.uwenku.com/question/p-gdhtyqza-m.html" target="_blank" title="將.net格式的字符串轉換爲java格式的字符串"> 將.net格式的字符串轉換爲java格式的字符串 </a> </li> <li class="side_article_list_item"> 5. <a href="http://hk.uwenku.com/question/p-calvykgr-q.html" target="_blank" title="將HHMM字符串轉換爲Java格式的GMT格式"> 將HHMM字符串轉換爲Java格式的GMT格式 </a> </li> <li class="side_article_list_item"> 6. <a href="http://hk.uwenku.com/question/p-nllujenp-dz.html" target="_blank" title="如何將字符串轉換爲java中的xml文件"> 如何將字符串轉換爲java中的xml文件 </a> </li> <li class="side_article_list_item"> 7. <a href="http://hk.uwenku.com/question/p-rdwibdud-bnz.html" target="_blank" title="將字符串轉換爲格式爲"> 將字符串轉換爲格式爲 </a> </li> <li class="side_article_list_item"> 8. <a href="http://hk.uwenku.com/question/p-kgmeknsa-bny.html" target="_blank" title="Android字符串xml文件格式化"> Android字符串xml文件格式化 </a> </li> <li class="side_article_list_item"> 9. <a href="http://hk.uwenku.com/question/p-abtfvpmf-bcd.html" target="_blank" title="將XML文檔轉換爲字符串?"> 將XML文檔轉換爲字符串? </a> </li> <li class="side_article_list_item"> 10. <a href="http://hk.uwenku.com/question/p-hqksbjau-bmk.html" target="_blank" title="將散列字符串轉換爲格式化的數字?"> 將散列字符串轉換爲格式化的數字? </a> </li> </ul> </div> </div> </div> </div> </div> </div> </div><!-- wrap end--> <!-- footer --> <footer id="footer"> <div class="bg-simple lt"> <div class="container"> <div class="row padder-v m-t"> <div class="col-xs-8"> <ul class="list-inline"> <li><a href="http://hk.uwenku.com/contact">聯系我們</a></li> <li>© 2020 HK.UWENKU.COM</li> <li><a target="_blank" href="https://beian.miit.gov.cn/">沪ICP备13005482号-4</a></li> <li><script type="text/javascript" src="https://v1.cnzz.com/z_stat.php?id=1280101193&web_id=1280101193"></script></li> <li><a href="http://www.uwenku.com/" target="_blank" title="优文库">简体中文</a></li> <li><a href="http://hk.uwenku.com/" target="_blank" title="優文庫">繁體中文</a></li> <li><a href="http://ru.uwenku.com/" target="_blank" title="поле вопросов и ответов">Русский</a></li> <li><a href="http://de.uwenku.com/" target="_blank" title="Frage - und - antwort - Park">Deutsch</a></li> <li><a href="http://es.uwenku.com/" target="_blank" title="Preguntas y respuestas">Español</a></li> <li><a href="http://hi.uwenku.com/" target="_blank" title="कार्यक्रम प्रश्न और उत्तर पार्क">हिन्दी</a></li> <li><a href="http://it.uwenku.com/" target="_blank" title="IL Programma di chiedere Park">Italiano</a></li> <li><a href="http://ja.uwenku.com/" target="_blank" title="プログラム問答園区">日本語</a></li> <li><a href="http://ko.uwenku.com/" target="_blank" title="프로그램 문답 단지">한국어</a></li> <li><a href="http://pl.uwenku.com/" target="_blank" title="program o park">Polski</a></li> <li><a href="http://tr.uwenku.com/" target="_blank" title="Program soru ve cevap parkı">Türkçe</a></li> <li><a href="http://vi.uwenku.com/" target="_blank" title="Đáp ứng viên">Tiếng Việt</a></li> <li><a href="http://fr.uwenku.com/" target="_blank" title="Programme interrogation Park">Française</a></li> </ul> </div> </div> </div> </div> </div> </footer> <!-- / footer --> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?f78a970f17b19a79fc477a3378096f29"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> </body> </html>