Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JSPÖÐдXMLÎļþ£¬¾Ü¾ø·ÃÎÊ

ÏîÄ¿ÖÐÓиötest.xmlÎļþ

HTML code:

<%@ page language="java" import="org.dom4j.*" pageEncoding="UTF-8"%>
<%@ page import="org.dom4j.io.*"%>
<%@ page import="java.io.*"%>
<html>
<head>
<title>XMLtest</title>
</head>

<body>
<%
Document document = DocumentHelper.createDocument();
//Éú³ÉÒ»¸ö½Óµã
Element root = document.addElement("root"); //Éú³ÉrootµÄÒ»¸ö½Óµã
Element category = root.addElement("category");
//Éú²úcategoryµÄÒ»¸ö½Óµã
Element id = category.addElement("id");
//Éú³ÉidÀïÃæµÄ²ÎÊýÖµ
id.addAttribute("name", "id");
//Éú³ÉidÀïÃæµÄÖµ
id.addText("1");

try{
//¶ÁÈ¡Îļþ
FileWriter fileWriter = new FileWriter("/test.xml");
//ÉèÖÃÎļþ±àÂë
OutputFormat xmlFormat = new OutputFormat();
xmlFormat.setEncoding("GBK");
//´´½¨Ð´Îļþ·½·¨
XMLWriter xmlWriter = new XMLWriter(fileWriter,xmlFormat);
//дÈëÎļþ
xmlWriter.write(document);
//¹Ø±Õ
xm


Ïà¹ØÎÊ´ð£º

ÀûÓÃC#±àдtxtת»¯µ½xmlµÄ³ÌÐò

txt ºÍXML ¸ñʽÏàÓ¦
²»½èÖúDataSet
µ¼Èë¶ÁÈ¡TXTÎļþ
È»ºóÖ±½ÓдÈëXML(ͬһÎļþ,²»Í¬Êý¾Ý,µÝÔöÔ­Êý¾ÝûÓб»¸²¸ÇÇé¿öÏÂÔö¼ÓÊý¾Ý.)
½Ì¸öÒªµã»ò×îºÃÊÇÓиö´úÂëÌáʾµÄ
¹ý·ºÃºº °ï¸öæÈö^^
²»»á£¬°ïÂ¥Ö÷ ......

jspÒ³ÃæÖÐ×ÖÌå±äÉ«ÎÊÌâ - Java / Web ¿ª·¢

<html><head><title>[@title]</title>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<script language='javascript'>
function diyCheck ......

ÈçºÎÓÃASP¶ÁÈ¡ XML - Web ¿ª·¢ / ASP

<?xml version="1.0"?>
<root>
<status>433</status>
<msg>Õâ¸öÊǺº×Ö</msg>
<serialno>123</serialno>
</root>
ÈçºÎÓÃASP¶ÁÈ¡ statusÖµ ......

JSP/Servlet½»»¥ - Java / Web ¿ª·¢

JSPÒ³ÃæÖÐÓжà¸öradio°´Å¥
  JSPÒ³Ãæ½«²ÎÊýPOST¸øservlet
  
  ÒªÇóÈçÏÂ;
  1.Ñ¡ÔñÒ»¸öradio£¬µ÷ÓÃservlet servletÖиù¾Ý²ÎÊýµ÷ÓÃÆäËû½Ó¿Ú£¬³ý·ÇÑ¡ÖиÃradio²¢µã»÷JSPÖеÄʵР......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ