Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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>


Ïà¹ØÎĵµ£º

C#СTip£ºXml²Ù×÷¼òÃ÷ÊÖ²á 3

3£©¶ÁÈ¡¡¢²éÕÒ
µ±ÄãÊÖÍ·ÓÐÒ»¸öxmlÎļþºó£¬¿ÉÒÔʹÓÃXmlDocument.Load()·½·¨½«Æä¼ÓÔؽøÀ´ÒԱ㴦Àí£¬ËùÒÔ“¶ÁÈ¡”ûÓÐʲô¿É˵µÄ¡£¶ø“²éÕÒ”²Ù×÷ÍùÍùÉæ¼°XPath£¬ÕâÀïÖ»ÊÇÎÒÈÏΪµÄ±È½Ï³£Óõ½µÄ²éÕÒ²Ù×÷£¬XPathÕâÍæÒâʵÔÚÊǺÜÇ¿´óºÜ±©Á¦¡£
 
»ØÍ·¿´Ê¾ÀýÎĵµxmlsample.xml£¬ÎÒÃÇ¿ÉÄÜÓöµ½ÕâÑùµÄÐèÇó£ ......

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

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

JavaÓëXMLÁªºÏ±à³ÌÖ®SAXƪ


SAX¸ÅÄî

SAXÊÇSimple API for XML
µÄËõд£¬Ëü²¢²»ÊÇÓÉW3C¹Ù·½ËùÌá³öµÄ±ê×¼£¬¿ÉÒÔ˵ÊÇ“Ãñ¼ä”µÄÊÂʵ±ê×¼¡£Êµ¼ÊÉÏ£¬ËüÊÇÒ»ÖÖÉçÇøÐÔÖʵÄÌÖÂÛ²úÎï¡£ËäÈ»Èç´Ë£¬ÔÚXMLÖжÔSAXµÄÓ¦ÓÃË¿ºÁ²»±ÈDOMÉÙ£¬¼¸ºõËùÓеÄXML½âÎöÆ÷¶¼»áÖ§³ÖËü¡£

Óë
DOM±È½Ï¶øÑÔ£¬SAXÊÇÒ»ÖÖÇáÁ¿Ð͵ķ½·¨¡£ÎÒÃÇÖªµÀ£¬ÔÚ´¦ÀíDOMµÄʱºò£¬Î ......

JAVA xml LSParserFilterµÄÓ¦ÓÃ

LSParserFilter---ÔØÈëÓë±£´æ
Ó¦ÓÃorg.w3c.dom ʵÏÖXMLµÄÔØÈëÓë±£´æʵÀý
/**
* ʵÏÖDOM3µÄLS(Load & Save)¹¦ÄÜ
*
* @author S.Well
* @see org.w3c.dom.DOMErrorHandler
* @see org.w3c.dom.ls.LSParserFilter
*/
public class XML_LS implements DOMErrorHandler, LSParserFilter {
private static ......

JAVA¶ÁXML£ºsax,dom,jdom,dom4jµÄ±È½ÏÒÔ¼°Ñ¡Ôñ(ת)

JAVA¶ÁXML£ºsax,dom,jdom,dom4jµÄ±È½ÏÒÔ¼°Ñ¡Ôñ(ת)
Ô­ÎÄ£ºwww.hicourt.gov.cn/homepage/show9_content.asp
SAX£º                                 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ