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

ʲôÊÇxml processing instruction(PI)£¿

from:
http://zhidao.baidu.com/question/67891842.html?si=1
ÏÂÃæµÄÒ»ÐоÍÊÇÔÚµÚ¶þ±¾ÊéµÄ¶¨Òå֮ǰµÄ£º
<?page render multiple authors ?>
ËäÈ»Ëü¿´ÉÏÈ¥ºÜÏñXMLÐòÑÔ£¬µ«Êµ¼ÊÉÏÊÇÒ»ÖÖ³ÆΪ´¦ÀíÖ¸Áprocessing instruction£©µÄ²»Í¬ÀàÐ͵ÄÓï·¨¡£´¦ÀíÖ¸ÁÒÔϼò³ÆPI£©µÄÄ¿µÄÊÇΪÁ˸ø´¦ÀíÒ³ÃæµÄ³ÌÐò£¨ÀýÈçXML½âÎöÆ÷£©Ìṩ¶îÍâµÄÐÅÏ¢¡£PIͨ³£Çé¿öÏÂÊÇûÓй̶¨¸ñʽµÄ£¬Î¨Ò»µÄÒªÇóÊǽôËæµÚÒ»¸öÎʺűØÐëÖÁÉÙÓÐÒ»¸ö×Öĸ¡£ÔÚ´ËÖ®ºó£¬PI¿ÉÒÔ°üº¬³ýÁËСÓںźʹóÓÚºÅÖ®ÍâµÄÈκÎ×Ö·û´®ÐòÁС£
×î³£¼ûµÄPIÊÇÓÃÀ´Ö¸¶¨XMLÎļþµÄÑùʽ±í£º
Õâ¸öPIÒ»°ã»áÖ±½Ó·ÅÔÚXMLÐòÑÔÖ®ºó£¬Í¨³£ÓÉWebä¯ÀÀÆ÷ʹÓã¬À´½«XMLÊý¾ÝÒÔÌØÊâµÄÑùʽÏÔʾ³öÀ´¡£
from:
http://e-learning.zjgsu.edu.cn/jdk5doc_zh_CN/org/w3c/dom/ProcessingInstruction.html
org.w3c.dom
½Ó¿Ú ProcessingInstruction
public interface ProcessingInstructionextends Node
ProcessingInstruction ½Ó¿Ú±íʾ“´¦ÀíÖ¸Á¬¸ÃÖ¸Áî×÷ΪһÖÖÔÚÎĵµµÄÎı¾Öб£³ÖÌض¨ÓÚ´¦ÀíÆ÷µÄÐÅÏ¢µÄ·½·¨ÔÚ XML ÖÐʹÓá£
²»¶Ô´¦ÀíÖ¸ÁîµÄÄÚÈݽøÐÐÈκδʻã¼ì²é£¬Òò´ËÔÚ¸ÃÄÚÈÝÖпÉÄÜÓÐ×Ö·ûÐòÁÐ "?>"£¬°´ÕÕ [XML 1.0] µÄ 2.6 ½Ú£¬¸ÃÐòÁÐÊÇ·Ç·¨µÄ¡£³öÏÖ´Ë×Ö·ûÐòÁÐÒ»¶¨»áÔÚÐòÁл¯ÆÚ¼äÉú³ÉÑÏÖØ´íÎó¡£
from:
http://www.javacommerce.com/displaypage.jsp?name=pi.sql&id=18238
Processing Instructions
Processing Instructions are information for the application. PI's allow documents to contain instructions for applications. They are not really of interest to the XML parser. Instead, the instructions are passed to the application using the parser, because the purpose of processing instructions is to represent special instructions for the application.
Like comments, they are not textually part of the XML document.
All processing instructions, including the XML declaration, begin with <? and end with ?>. Following the initial <?, you will find the name of the processing instruction. The PI begins with the PITarget  used to identify the application to which the instruction is directed.
<?name pidata?>
<?xml version="1.0"? encoding="UTF-8" standalone="yes"?>
Version Declaration is a form of PI.


Ïà¹ØÎĵµ£º

javaÉú³ÉXMLÎļþ×Ô¶¯»»ÐÐÎÊÌâ

Java codeFormat ft=Format.getRawFormat();
ft.setEncoding("utf-8");
ft.setIndent("    ");//ÉèÖÃËõ½ø
       
XMLOutputter outputter=new XMLOutputter(ft);//ÉèÖÃXML¸ñʽ
Õâλ˵µÄ²»´í£»
ÔÚieÀïÃ棬ËüÄÜ°Ñxml×Ô¶¯½âÎö³ÆÊ÷Ðνṹ£¬ËùÒÔ¿´ÆðÀ´Ã»ÎÊÌ⣬ÔÚ¼Çʱ¾ÀïÃ棬¾Í²»ÐÐÁ ......

DataSet XMl DateTable »¥×ª

/// <summary>
/// DataTable-------------------->XML --String
/// </summary>
public static String ToXmlString(DataTable dt)
{
StringWriter tr = new StringWriter();
try
{
dt.WriteXml(tr); ......

XML½âÎö¼¼Êõ

 XMLѧϰÍêÁË£¬ÀÏʦ˵ÔÚÃæÊÔµÄʱºòÓпÉÄÜÒªÎʵ½ÕâЩ£¬ËùÒÔÓÖÕÒÁËЩ×ÊÁÏ£¬ÔÚMLDNµÄÕâ¶ÎÈÕ×ÓÀÀÏʦÃǶ¼°Ñ¸÷¸öÃæÊÔÖÐÓпÉÄÜÒªÎʵ½µÄÎÊÌⶼ°ïÎÒÃÇÒ»Ò»×ܽᣬÕæµÄºÜ¸ÐлMLDNµÄÈ«²¿ÀÏʦ,ÏîÄ¿ÀÏʦ°ïÎÒÃÇÈÏÕæµÄ½²½âÏîÄ¿£¬¸¨µ¼ÏîÄ¿£¬½ÌѧÀÏʦ°ïÎÒÃÇÈÏÕæ×ܽá¸÷¸ö¼¼Êõ£¬¸Ðл£¬ÕæµÄÊǸÐл£¬ºÇºÇ£¬ÎÒ»áŬÁ¦¸ãºÃµÄ
JavaÖÐËÄÖÖXML ......

javascript¶¯Ì¬×°ÈëXMLÊý¾Ý


ʹÓÃjavascript´´½¨Microsoft XML DOM,¾Í¿ÉÒÔÍê³ÉÕâÒ»¹¤×÷.
// ×°ÈëÊý¾Ý.
var source = new ActiveXObject("Microsoft.XMLDOM");
source.async = false
source.load("history.xml");
// ×°ÈëÑùʽ±í.
var stylesheet = new ActiveXObject("Microsoft.XMLDOM");
stylesheet.async = false
stylesheet.load( ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ