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

xml¡¢xsdºÍxslÖ®¼äµÄ¹ØϵºÍʹÓÃʵÀý

¼òµ¥µØ˵£¬xslÊÇ˵Ã÷xmlÈçºÎ±í´ï³öÀ´µÄÑùʽÎļþ£¬¶øxsd¸ø³öxmlÎļþµÄ¸ñʽÃèÊö
Èç¹û˵xmlÊÇÒ»µþ³®Æ±£¬xsd¾ÍÊÇÑé³®»ú£¬¿´¿´ÀïÃæÓÐûÓмٳ®£¬¶øxslÊǵ㳮»ú£¬¿´¿´µ½µ×ÊǶàÉÙÇ®¡£ÓÃxml¿ÉÒÔ²»ÓÃxsd£¬¾ÍÏñ»¨Ç®µÄʱºò²»Ò»¶¨ÒªÑé³®Ò»Ñù£¬µ«ÊÇÊÕÇ®µÄÈËÒ»°ãÊÇÏëÒªÑéµÄ¡£¶ø»¨Ç®µÄʱºò²»Äܲ»µã³®£¬²»µãÄǾͲ»ÊÇ»¨Ç®ÁË£¬ÊÇÍæÇ®¡£µ±È»ÁË£¬µã³®²»Ò»¶¨ÒªÓõ㳮»ú£¬Ò²¿ÉÒÔÓÃÊֵ㡣 
  ±È·½²»ÊǺÜÇ¡µ±¡£Ïë˵Ã÷µÄÊÇ£¬xml£¨ÎļþÀïÃæµÄ¶«Î÷£©ÊÇÄÚÈÝ£¬xsdÊÇÄÚÈݵĸñʽ£¬xslÊÇ´¦ÀíÄÚÈݵġ£
ÏÂÃæÊÇxmlºÍxsl½áºÏµÄÀý×Ó
product.xmlÎļþµÄÄÚÈÝÈçÏÂ
<?xml version="1.0"?>
<?xml:stylesheet type="text/xsl" href="table.xsl"?>
<PRODUCTDET>
<PRODUCT PRODID="P001" CATEGORY="TOY">
<DESCRIPTION>SWPI</DESCRIPTION>
<COLOR>BLUE</COLOR>
<RATE>100</RATE>
</PRODUCT>

<PRODUCT PRODID="P002" CATEGORY="TOY">
<DESCRIPTION>SWPI</DESCRIPTION>
<COLOR>BLUE</COLOR>
<RATE>200</RATE>
</PRODUCT>
<PRODUCT PRODID="P003" CATEGORY="BOOK">
<DESCRIPTION>SWPI</DESCRIPTION>
<COLOR>BLUE</COLOR>
<RATE>300</RATE>
</PRODUCT>
</PRODUCTDET>

table.xslµÄÄÚÈÝÈçÏÂ
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="COLOR">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="COLOR[end()]">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="text()">
<xsl:value-of select="." />
</xsl:template>
<xsl:template match="/">
<html>
<head><title>MY PRO COLL</title></head>


Ïà¹ØÎĵµ£º

lucene ½âÎöxml ÉîδÀ´¼¼Êõ

1¡¢°²×°DOM4j
http://www.dom4j.org/
2¡¢°²×°jaxen
http://jaxen.org/releases.html
3¡¢´úÂë
package extract;
import java.io.*;
import org.dom4j.*;
import org.dom4j.io.*;
import java.util.*;
public class XmlExtract {
    private SAXReader reader;
    private Docum ......

¶¯Ì¬´´½¨XMLÎĵµ


var createXML = function (str) {
if (typeof DOMParser !== "undefined") {
return (new DOMParser()).parsefromString(str, "application/xml");
}else if (typeof ActiveXObject != "undefined") {
if (typeof arguments.callee.activeXString !== "string" ......

Jdbc,Jdo,XML·½Ãæ


1¡¢Class.forNameµÄ×÷ÓÃ?ΪʲôҪÓÃ?
´ð£ºµ÷Óø÷ÃÎÊ·µ»ØÒ»¸öÒÔ×Ö·û´®Ö¸¶¨ÀàÃûµÄÀàµÄ¶ÔÏó¡£
2¡¢JdoÊÇʲô?
´ð£ºJDOÊÇJava¶ÔÏó³Ö¾Ã»¯µÄеĹ淶£¬Îªjava data objectµÄ¼ò³Æ,Ò²ÊÇÒ»¸öÓÃÓÚ´æȡijÖÖÊý¾Ý²Ö¿âÖеĶÔÏóµÄ±ê×¼»¯API¡£JDOÌṩÁË͸Ã÷µÄ¶ÔÏó´æ´¢£¬Òò´Ë¶Ô¿ª·¢ÈËÔ±À´Ëµ£¬´æ´¢Êý¾Ý¶ÔÏóÍêÈ«²»ÐèÒª¶îÍâµÄ´úÂ루ÈçJDBC ......

Delphi²Ù×÷XMLµÄ¼¼ÇÉ

  Delphi²Ù×÷XMLÊǺܷ½±ãµÄ£¬Ö÷ÒªÓÐÁ½ÖÖ·½·¨£»
     1.ÓÃTClientDataSet²Ù×÷XML£»TClientDataSetÊǸöºÃ¶«Î÷£¬ÓÃËü²Ù×÷XMLÊǺܼòµ¥µÄÊ£¬²»¹ýȱµãÊÇÖ»ÄܲÙ×÷¹Ì¶¨¸ñʽµÄ XML£¬ËüÊʺϲÙ×÷±í½á¹¹µÄÊý¾Ý£¬Èç¹ûÄãÐèÒª°ÑÊý¾Ý±íµ¼³ö³ÉXMLÄÇÓÃTClientDataSetÊǸöºÃÖ÷Ò⣬±ÈÈçÏÂÃæÊÇÒ»¸öÊý¾Ý¼¯µ¼³ö³ÉXMLµÄ· ......

XML ¶Á

StringBuilder output = new
StringBuilder();
String xmlString =
@"<bookstore>
<book genre='novel' ISBN='10-861003-324'>
<title>The Handmaid's Tale</title>
<price>19.95</price>
</book>
<book genre='novel' ISBN='1-861001-57-5' ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ