html效果截图:

1、首先分析html代码结构:

结果如图:

2、调用接口返回的数据格式:

3、由第一步可看出每2个数据为一行并排显示,后台返回的数据总数可能为奇数个或偶数个,对应该生成的xml结构:

4、对应的xslt文件代码

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
  4. >
  5. <xsl:output method="html" indent="yes"/>
  6. <xsl:template match="/root">
  7.  
  8. <html lang="en">
  9.  
  10. <head>
  11. <title>REAL ESTATE</title>
  12. <meta charset="utf-8"></meta>
  13. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  14. <link rel="shortcut icon" href="http://joannarealestate.com.cn/images/jre_logo.png" type="image/png"></link>
  15. </head>
  16. <style>
  17. th.c20 {
  18. font-size: 0pt;
  19. line-height: 0pt;
  20. padding: 0;
  21. margin: 0;
  22. font-weight: normal;
  23. vertical-align: top;
  24. }
  25.  
  26. table.c19 {
  27. border-bottom: 1px solid rgb(219, 219, 219);
  28. }
  29.  
  30. td.c18 {
  31. background-color: #FFFFFF;
  32. /*border: 1px solid #232129;*/
  33. }
  34.  
  35. td.c17 {
  36. color: #232129;
  37. font-family: Arial, sans-serif;
  38. font-size: 12px;
  39. width: 148px;
  40. height: 40px;
  41. line-height: 16px;
  42. text-align: center;
  43. }
  44.  
  45. a.c16 {
  46. color: #232129;
  47. text-decoration: none;
  48. }
  49.  
  50. img.c15 {
  51. margin: 0;
  52. padding: 0;
  53. max-width: 25px;
  54. }
  55.  
  56. img.c14 {
  57. margin: 0;
  58. padding: 0;
  59. max-width: 23px;
  60. }
  61.  
  62. td.c13 {
  63. color: #232129;
  64. font-family: Arial, sans-serif;
  65. font-size: 16px;
  66. line-height: 22px;
  67. text-align: left;
  68. }
  69.  
  70. td.c12 {
  71. font-size: 0pt;
  72. line-height: 0pt;
  73. text-align: left;
  74. }
  75.  
  76. img.c11 {
  77. margin: 0;
  78. padding: 0;
  79. max-width: 20px;
  80. }
  81.  
  82. div.c10 {
  83. color: #232129;
  84. font-family: Arial, sans-serif;
  85. font-size: 16px;
  86. line-height: 18px;
  87. text-align: center;
  88. }
  89.  
  90. span.c9 {
  91. color: #1d78be;
  92. font-size: 20px;
  93. }
  94.  
  95. table.c8 {
  96. font-size: 0pt;
  97. line-height: 0pt;
  98. text-align: center;
  99. width: 100%;
  100. min-width: 100%;
  101. }
  102.  
  103. td.c7 {
  104. font-size: 0pt;
  105. line-height: 0pt;
  106. text-align: center;
  107. width: 100%;
  108. min-width: 100%;
  109. }
  110.  
  111. div.c6 {
  112. color: #ff6f51;
  113. font-family: Arial, sans-serif;
  114. font-size: 20px;
  115. line-height: 26px;
  116. text-align: center;
  117. margin: 10px 0px 5px 0px;
  118. }
  119.  
  120. a.c5 {
  121. color: #232129;
  122. text-decoration: none;
  123. }
  124.  
  125. td.c4 {
  126. background-color: #DBDBDB;
  127. font-size: 0pt;
  128. line-height: 0pt;
  129. text-align: left;
  130. }
  131.  
  132. div.c3 {
  133. font-size: 0pt;
  134. line-height: 0pt;
  135. text-align: left;
  136. }
  137.  
  138. a.c2 {
  139. color: #232129;
  140. text-decoration: none;
  141. display: block;
  142. }
  143.  
  144. img.c1 {
  145. margin: 0;
  146. padding: 0;
  147. width: 294px;
  148. height: 183px;
  149. }
  150. </style>
  151.  
  152. <body>
  153. <table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  154. <tbody>
  155. <tr>
  156. <td align="center" valign="top">
  157. <table border="0" cellpadding="0" cellspacing="0" width="600">
  158. <tbody>
  159. <tr>
  160. <td class="td" style="font-size: 0pt; line-height: 0pt; padding: 0; margin: 0; font-weight: normal; width: 600px; min-width: 600px;" width="600">
  161. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  162. <tbody>
  163. <tr>
  164. <td id="target">
  165.  
  166. <div repeatindex="3">
  167. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  168. <tbody>
  169. <tr>
  170. <td class="content-spacing" style="font-size: 0pt; line-height: 0pt; text-align: left;" width="20"></td>
  171. <td align="center">
  172. <table border="0" cellpadding="0" cellspacing="0" class="center">
  173. <tbody>
  174. <tr>
  175. <td>
  176. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  177. <tbody>
  178. <tr>
  179. <td class="content-spacing" style="font-size: 0pt; line-height: 0pt; text-align: left;" width="25"></td>
  180. <td>
  181. <div class="h6-center" style="color: #232129;font-size: 26px;line-height: 20px;text-align: center;padding-bottom: 10px;">
  182. <div>最新推荐房源</div>
  183. </div>
  184. <table border="0" cellpadding="0" cellspacing="0" class="spacer" style="font-size: 0pt; line-height: 0pt; text-align: center; width: 100%; min-width: 100%;" width="100%">
  185. <tbody>
  186. <tr>
  187. <td class="spacer" height="5" style="font-size: 0pt; line-height: 0pt; text-align: center; width: 100%; min-width: 100%;"> </td>
  188. </tr>
  189. </tbody>
  190. </table>
  191. </td>
  192. <td class="content-spacing" style="font-size: 0pt; line-height: 0pt; text-align: left;" width="25"></td>
  193. </tr>
  194. </tbody>
  195. </table>
  196. <table bgcolor="#232129" border="0" cellpadding="0" cellspacing="0" class="border" style="font-size: 0pt; line-height: 0pt; text-align: center; width: 100%; min-width: 100%;" width="100%">
  197. <tbody>
  198. <tr>
  199. <td bgcolor="#232129" class="border" height="1" style="font-size: 0pt; line-height: 0pt; text-align: center; width: 100%; min-width: 100%;"> </td>
  200. </tr>
  201. </tbody>
  202. </table>
  203. </td>
  204. </tr>
  205. </tbody>
  206. </table>
  207. <table border="0" cellpadding="0" cellspacing="0" class="spacer" style="font-size: 0pt; line-height: 0pt; text-align: center; width: 100%; min-width: 100%;" width="100%">
  208. <tbody>
  209. <tr>
  210. <td class="spacer" height="10" style="font-size: 0pt; line-height: 0pt; text-align: center; width: 100%; min-width: 100%;"> </td>
  211. </tr>
  212. </tbody>
  213. </table>
  214. </td>
  215. <td class="content-spacing" style="font-size: 0pt; line-height: 0pt; text-align: left;" width="20"></td>
  216. </tr>
  217. </tbody>
  218. </table>
  219. </div>
  220. <div repeatindex="4">
  221. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  222. <tbody>
  223. <tr>
  224. <td class="content-spacing" style="font-size: 0pt; line-height: 0pt; text-align: left;" width="75"></td>
  225. <td align="center">
  226. <div class="text-center" style="font-size: 20px;font-weight: normal;line-height: 30px;color: #333333;text-align: center;">
  227. <div>
  228. <br/>
  229. 我们为您推荐这些也许是您想要查看的最新房源。
  230. </div>
  231. </div>
  232. <table border="0" cellpadding="0" cellspacing="0" class="spacer" style="font-size: 0pt; line-height: 0pt; text-align: center; width: 100%; min-width: 100%;" width="100%">
  233. <tbody>
  234. <tr>
  235. <td class="spacer" height="35" style="font-size: 0pt; line-height: 0pt; text-align: center; width: 100%; min-width: 100%;"> </td>
  236. </tr>
  237. </tbody>
  238. </table>
  239. </td>
  240. <td class="content-spacing" style="font-size: 0pt; line-height: 0pt; text-align: left;" width="75"></td>
  241. </tr>
  242. </tbody>
  243. </table>
  244. </div>
  245. <!-- 房子 -->
  246. <xsl:for-each select="./row">
  247. <div repeatindex="6">
  248. <table border="0" cellpadding="0" cellspacing="0" class="mobile-full" width="600">
  249. <tbody>
  250. <tr>
  251. <td colspan="3">
  252. <table border="0" cellpadding="0" cellspacing="0" style="margin-bottom:20px;" width="100%">
  253. <tbody>
  254. <tr>
  255.  
  256. <!--奇数行-->
  257. <th class="column-top c20" valign="top" width="294">
  258. <xsl:for-each select="./RecommendationsList[position() mod 2=1]">
  259. <xsl:call-template name="data2"></xsl:call-template>
  260. </xsl:for-each>
  261. </th>
  262.  
  263. <!--间隔-->
  264. <th class="column-top" style="font-size:0pt;line-height:0pt;padding:0;margin:0;font-weight:normal;vertical-align:top;" valign="top" width="10">
  265. <table border="0" cellpadding="0" cellspacing="0" class="spacer c2" width="100%">
  266. <tbody>
  267. <tr>
  268. <td class="spacer c1" height="30"></td>
  269. </tr>
  270. </tbody>
  271. </table>
  272. </th>
  273.  
  274. <!--偶数行-->
  275. <th class="column-top c20" valign="top" width="294">
  276. <xsl:for-each select="./RecommendationsList[position() mod 2=0]">
  277. <xsl:call-template name="data2"></xsl:call-template>
  278. </xsl:for-each>
  279. </th>
  280. </tr>
  281. </tbody>
  282. </table>
  283. </td>
  284. </tr>
  285. </tbody>
  286. </table>
  287. </div>
  288. </xsl:for-each>
  289. <!-- /房子 -->
  290. </td>
  291. </tr>
  292. </tbody>
  293. </table>
  294. </td>
  295. </tr>
  296. </tbody>
  297. </table>
  298. </td>
  299. </tr>
  300. </tbody>
  301. </table>
  302. </body>
  303.  
  304. </html>
  305. </xsl:template>
  306.  
  307. <xsl:template name="data2" match="child::*">
  308. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  309. <tbody>
  310. <tr>
  311. <td>
  312. <div class="fluid-img c3">
  313. <xsl:element name="a">
  314. <xsl:attribute name="href">
  315. <xsl:text>http://joannarealestate.com.cn/property.html?houseID=</xsl:text>
  316. <xsl:value-of select="./ID"/>
  317. </xsl:attribute>
  318. <xsl:attribute name="class">c2</xsl:attribute>
  319. <xsl:attribute name="target">_blank</xsl:attribute>
  320. <xsl:element name="img">
  321. <xsl:attribute name="border">0</xsl:attribute>
  322. <xsl:attribute name="width">294</xsl:attribute>
  323. <xsl:attribute name="height">183</xsl:attribute>
  324. <xsl:attribute name="class">c1</xsl:attribute>
  325. <xsl:attribute name="href">
  326. <xsl:text>http://img.jrechina.com</xsl:text>
  327. <xsl:value-of select="./PicUrl"/>
  328. </xsl:attribute>
  329. </xsl:element>
  330. </xsl:element>
  331. </div>
  332. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  333. <tbody>
  334. <tr>
  335. <td class="img c4" width="1"></td>
  336. <td>
  337. <table style="border:1px #CCC solid;" border="0" cellpadding="0" cellspacing="0" class="c19" width="100%">
  338. <tbody>
  339. <tr>
  340. <td align="center" colspan="3">
  341. <div class="h4-1-orange-center c6" style="margin-top: 20px">
  342. <xsl:element name="a">
  343. <xsl:attribute name="href">
  344. <xsl:text>http://joannarealestate.com.cn/property.html?houseID=</xsl:text>
  345. <xsl:value-of select="./ID"/>
  346. </xsl:attribute>
  347. <xsl:attribute name="class">c5</xsl:attribute>
  348. <xsl:attribute name="target">_blank</xsl:attribute>
  349. <xsl:attribute name="style">display: block;margin-bottom: 20px; font-size:16px</xsl:attribute>
  350. <xsl:value-of select="./CommunityNameE"/>
  351. </xsl:element>
  352. </div>
  353. <table border="0" cellpadding="0" cellspacing="0" class="spacer c8" width="100%">
  354. <tbody>
  355. <tr>
  356. <td class="spacer c7" height="5"></td>
  357. </tr>
  358. </tbody>
  359. </table>
  360. <div class="text-2-center c10" style="font-size:16px">
  361. <span class="c9">
  362. <xsl:value-of select="./Min_ZJ"/>
  363. </span> /Month
  364. </div>
  365. <table border="0" cellpadding="0" cellspacing="0" class="spacer c8" width="100%">
  366. <tbody>
  367. <tr>
  368. <td class="spacer c7" height="15"></td>
  369. </tr>
  370. </tbody>
  371. </table>
  372. <div>
  373. <table border="0" cellpadding="0" cellspacing="0" class="center">
  374. <tbody>
  375. <tr>
  376. <td class="img c12" width="20">
  377. <img border="0" src="http://crm.joannarealestate.com.cn/HD/ZhongQiu_en/images/bed.jpg" class="c11"/>
  378. </td>
  379. <td class="img c12" width="5"></td>
  380. <td class="text c13" style="font-size:16px">
  381. <div>
  382. <xsl:value-of select="./Bedroom"/>
  383. </div>
  384. </td>
  385. <td class="img c12" width="20"></td>
  386. <td class="img c12" width="20">
  387. <img border="0" src="http://crm.joannarealestate.com.cn/HD/ZhongQiu_en/images/wash.jpg" class="c14"/>
  388. </td>
  389. <td class="img c12" width="5"></td>
  390. <td class="text c13" style="font-size:16px">
  391. <div>
  392. <xsl:value-of select="./Washroom"/>
  393. </div>
  394. </td>
  395. <td class="img c12" width="20"></td>
  396. <td class="img c12" width="20">
  397. <img border="0" src="http://crm.joannarealestate.com.cn/HD/ZhongQiu_en/images/sqm.jpg" class="c15"/>
  398. </td>
  399. <td class="img c12" width="5"></td>
  400. <td class="text c13">
  401. <div style="font-size:16px">
  402. <xsl:value-of select="./RoomSize"/>
  403. </div>
  404. </td>
  405. </tr>
  406. </tbody>
  407. </table>
  408. <table border="0" cellpadding="0" cellspacing="0" class="spacer c8" width="100%">
  409. <tbody>
  410. <tr>
  411. <td class="spacer c7" height="15"></td>
  412. </tr>
  413. </tbody>
  414. </table>
  415. </div>
  416. <table border="0" cellpadding="0" cellspacing="0" class="spacer c8" width="100%">
  417. <tbody>
  418. <tr>
  419. <td class="spacer c7" height="15"></td>
  420. </tr>
  421. </tbody>
  422. </table>
  423. <table border="0" cellpadding="0" cellspacing="0" class="center">
  424. <tbody>
  425. <tr>
  426. <td class="c18">
  427. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  428. <tbody>
  429. <tr>
  430. <td class="text-btn-black c17" colspan="3" style="color:#232129;font-family:Arial, sans-serif;font-size:12px;width: 148px;height: 40px;line-height:16px;text-align:center;">
  431. <div>
  432. <xsl:element name="a">
  433. <xsl:attribute name="href">
  434. <xsl:text>http://joannarealestate.com.cn/property.html?houseID=</xsl:text>
  435. <xsl:value-of select="./RecommendationsList/ID"/>
  436. </xsl:attribute>
  437. <xsl:attribute name="class">link-black c16</xsl:attribute>
  438. <xsl:attribute name="target">_blank</xsl:attribute>
  439. <xsl:attribute name="style">color:#232129;text-decoration:none;</xsl:attribute>
  440. <xsl:text>FIND OUT MORE</xsl:text>
  441. </xsl:element>
  442. </div>
  443. </td>
  444. </tr>
  445. </tbody>
  446. </table>
  447. </td>
  448. </tr>
  449. </tbody>
  450. </table>
  451. <table border="0" cellpadding="0" cellspacing="0" class="spacer c8" width="100%">
  452. <tbody>
  453. <tr>
  454. <td class="spacer c7" height="30"></td>
  455. </tr>
  456. </tbody>
  457. </table>
  458. </td>
  459. </tr>
  460. </tbody>
  461. </table>
  462. </td>
  463. <td class="img c4" width="1"></td>
  464. </tr>
  465. </tbody>
  466. </table>
  467. </td>
  468. </tr>
  469. </tbody>
  470. </table>
  471. </xsl:template>
  472. </xsl:stylesheet>

xslt代码

5、调用接口生成xml的代码:

  1. string Owner_ID = EncryptHelper.DESEncrypt("18745_9479", "test");
  2. string url = string.Format("http://netapi.jrechina.com/Handler/FYGL.ashx?Action=GetRecommendationsList&lan={0}&Owner_ID={1}&page=1&rows=4", , Owner_ID);
  3.  
  4. XDocument doc = new XDocument(
  5. new XProcessingInstruction("xml-stylesheet", "href=\"RecommendationsList.xslt\" type=\"text/xsl\""));
  6. XElement eleRoot = new XElement("root");//根节点
  7. doc.Add(eleRoot);
  8.  
  9. //根据用户ID拼接请求获取该用户的推荐列表(取前4条)
  10. string res = HttpHelper.GetData(url);
  11. dynamic result = Utility.Helper.FromJson<dynamic>(res);
  12.  
  13. if (result.DataList != null && (int)result.DataList.Count > )
  14. {
  15. int totalCount = (int)result.DataList.Count;
  16. int rows = totalCount % > ? totalCount / + : totalCount / ;//2个数据为一行
  17. XElement eleRow = new XElement("row");
  18. //eleRoot.Add(eleRow);
  19. XElement eleRecommendationsList;
  20. int index = ;//循环到第几个
  21. foreach (dynamic item in result.DataList)
  22. {
  23. index++;
  24. if (index % == )
  25. {//奇数个表示新起一行
  26. eleRow = new XElement("row");
  27. }
  28.  
  29. eleRecommendationsList = new XElement("RecommendationsList",
  30. new XElement("ID", (item.ID??"").ToString()),
  31. new XElement("HouseNo", (item.HouseNo??"").ToString()),
  32. new XElement("RoomSize", (item.RoomSize??"").ToString()),
  33. new XElement("Bedroom", (item.Bedroom??"").ToString()),
  34. new XElement("Washroom", (item.Washroom??"").ToString()),
  35. new XElement("PicUrl", string.IsNullOrEmpty((string)item.PicUrl) ? "" : ((string)item.PicUrl).Replace("sm_", "").Replace("sf_", "").Replace(".", "@640@412@cut@1.")),
  36. new XElement("Min_ZJ", (item.Min_ZJ??"").ToString()),
  37. new XElement("FY_Subtitle", (item.FY_Subtitle??"").ToString()),
  38. new XElement("FY_Subtitle_CN", (item.FY_Subtitle_CN ?? "").ToString()),
  39. new XElement("CommunityNameE", (item.CommunityNameE ?? "").ToString()),
  40. new XElement("CommunityNameC", (item.CommunityNameC ?? "").ToString()),
  41. new XElement("PropertyName_C", (item.PropertyName_C ?? "").ToString()),
  42. new XElement("PropertyName_E", (item.PropertyName_E ?? "").ToString()),
  43. new XElement("E_Address", (item.E_Address ?? "").ToString()),
  44. new XElement("DistrictName", (item.DistrictName ?? "").ToString()),
  45. new XElement("DistrictNameC", (item.DistrictNameC ?? "").ToString()),
  46. new XElement("BusinessCircleName", (item.BusinessCircleName ?? "").ToString()),
  47. new XElement("BusinessCircleNameC", (item.BusinessCircleNameC ?? "").ToString())
  48. );
  49. eleRow.Add(eleRecommendationsList);
  50.  
  51. if (index % == || index % > && index >= totalCount)
  52. {//是偶数个或最后一个且是奇数个
  53. eleRoot.Add(eleRow);
  54. }
  55. }
  56. }
  57.  
  58. string savePath = @"G:\zhyue\backup\projects\Test\ConsoleApplication1\测试\XSLT和XML结合使用\RecommendationsList.xml";
  59. if (File.Exists(savePath)) File.Delete(savePath);
  60. doc.Save(savePath);

调用接口生成xml代码

6、浏览器中查看xml:

成功,不过xml无法直接访问图片,没找到解决法案,html是可以的

C# xml通过xslt转换为html输出的更多相关文章

  1. xml之XSLT

     1.XSLT是什么  XSLT是XSL的子集,XSL是样式表.XSLT的作用:将XML文档转化成HTML,做的是中间转换者. 而主要需要学习的是XSLT(XSLTransformation).  2 ...

  2. Winform: use the WebBrowser to display XML with xslt, xml, xslt 转 html 字符串

    原文:Winform: use the WebBrowser to display XML with xslt, xml, xslt 转 html 字符串 声明xml字符串: string xml = ...

  3. 【转】php中XML、XSLT的结合运用

    原文:http://blog.csdn.net/bjbs_270/article/details/140253   下面我要讲的是一个简单的从数据库中抽取数据,生成XML文档,使用XSLT转换成HTM ...

  4. ASP.NET 动态查找数据 并且生成xml文档 同时使用xslt转换为xhtml

    前言 xsl是一门标签解析语言,很适合做动态网页的前台标签 www.bamn.cn 1 首先是aspx页面 添加一个输入框 按钮 还有一个用来显示解析后的xhtml代码的控件 <form id= ...

  5. c#使用XSLT将xml文档转换为html文档

    需要引用下面的命名空间: using System.Xml; using System.Xml.Xsl; 方法实现: public static string ConvertXML(XmlDocume ...

  6. 使用Python把Gtest XML测试结果转换为HTML格式

    在最近的测试中,使用gtest测试框架对c语言代码进行测试,结果以XML文件来保存,但是测试结果的查阅和分析非常不方便.便想着把xml的结果直接转为HTML文件,方便和Jenkins系统对接显示.因现 ...

  7. C#操作Xml:XSLT语法 在.net中使用XSLT转换xml文档示例

    XSL即可扩展的样式表文件. 可以格式化xml的显示,也可以将xml转换成需要的另一种格式. 学习XSL必须熟悉XPath.XSL和XPath一样简单强大,容易学习. 1. XSL既然可以格式化xml ...

  8. C++读入二进制数并转换为十进制输出

    题目描述 已知一个只包含0和1的二进制数,长度不大于10,将其转换为十进制并输出. 输入描述 输入一个二进制整数n,其长度不大于10 输出描述 输出转换后的十进制数,占一行 样例输入 样例输出 sol ...

  9. XML, XPath, Xslt及解析/Parse

    XML及解析/Parse "Programming with libxml2 is like the thrilling embrace of an exotic stranger.&quo ...

随机推荐

  1. Java之Spring Boot学习

    1.如何配置pdf.xls页面解析器.2.如何整合SpringBoot+JPA+Session+Redis配置.3.SpringBoot整合Mybatis之事务用法.4.JUnit Test单元测试用 ...

  2. WebDriver高级应用实例(1)

    1.1使用JavaScriptExecutor单击元素 被测网页的网址: http://www.baidu.com Java语言版本的API实例代码 import org.testng.annotat ...

  3. Python基础部分的疑惑解析——pycharm(4)

    PyCharm部分设置: 1.安装后破解    2.创建的项目project实际上就是文件夹,可以在右键--show in explorer显示文件夹 3.右键-new--directory是建文件夹 ...

  4. 前后端分离最佳实现,使用Nuxt.js快速搭建单页SSR应用

    通常我们搭建ssr应用需要自己选择多个组件集成到一起 webpack babel loaders router server-render 各种入口配置等 如果是基于vue+vuex+vue-rout ...

  5. sql子查询在insert、update、delete中的应用

    子查询可以应用在INSERT.UPDATE以及DELETE等语句中,合理的使用子查询将能够简化功能的实现并且极大的提高SQL语句执行的效率 用到的表: CREATE TABLE `t_readerfa ...

  6. django项目的生产环境部署,利用nginx+uwsgi

    1.坏境准备 centos6.5 django项目 python坏境(python3.6,) 所需的各种模块(django,uwsgi,sqlite3)具体看坏境 我的测试django项目的数据库用的 ...

  7. protocol buffer开发指南

    ProtoBuf 是一套接口描述语言(IDL)和相关工具集(主要是 protoc,基于 C++ 实现),类似 Apache 的 Thrift).用户写好 .proto 描述文件,之后使用 protoc ...

  8. C#循环读取文件流,按行读取

    public Dictionary<string,string> GetSourceDisksElements(String section) { section = "[&qu ...

  9. ArrayList的subList方法

    参考博文使用java.util.List.subList时最好小心点 List接口中定义: List<E> subList(int fromIndex, int toIndex); 英文注 ...

  10. springMVC实现json

    很多时候前端都需要调用后台服务实现交互功能,常见的数据交换格式多是JSON或XML,这里主要讲解Spring MVC为前端提供JSON格式的数据并实现与前台交互. 一.概要 JSON(JavaScri ...