ʲôÊÇ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.
Ïà¹ØÎĵµ£º
1¡¢µ¼³öµ½XMl select * from Brand for xml auto ,root('Brands')
<Brands>
<Brand BrandID="E584596D-4D66-4F2F-B6F7-71C3BEB4CA21" Name="inganico" />
<Brand BrandID="19B04451-DDC4-4CDF-BE30-CB4E703B27DA" Name="°²¸¶´ï" />
<Brand BrandID="3C6C8E12-7C4A-4F1 ......
½âÎö_Net¿ò¼ÜϵÄXML±à³Ì¼¼Êõ
Ò»£®Ç°ÑÔ£º
XMLÊÇ΢Èí.NetÕ½ÂÔµÄÒ»¸öÖØÒª×é³É²¿·Ö£¬¶øÇÒËü¿ÉνÊÇXML Web·þÎñµÄ»ùʯ£¬ËùÒÔÕÆÎÕ.Net¿ò¼ÜϵÄXML¼¼Êõ×ÔÈ»ÏԵ÷dz£ÖØÒªÁË¡£±¾ÎĽ«Ö¸µ¼´ó¼ÒÈçºÎÔËÓÃC#ÓïÑÔÍê³É.Net¿ò¼ÜϵÄXMLÎĵµµÄ¶Áд²Ù×÷¡£Ê×ÏÈ£¬ÎÒ»áÏò´ó¼Ò½éÉÜ.Net¿ò¼ÜÖÐÓëXMLÏà ......
Java codeFormat ft=Format.getRawFormat();
ft.setEncoding("utf-8");
ft.setIndent(" ");//ÉèÖÃËõ½ø
XMLOutputter outputter=new XMLOutputter(ft);//ÉèÖÃXML¸ñʽ
Õâλ˵µÄ²»´í£»
ÔÚieÀïÃæ£¬ËüÄܰÑxml×Ô¶¯½âÎö³ÆÊ÷Ðνṹ£¬ËùÒÔ¿´ÆðÀ´Ã»ÎÊÌ⣬ÔÚ¼Çʱ¾ÀïÃæ£¬¾Í²»ÐÐÁ ......
IsolatedStorageFile£º°üº¬ÎļþºÍÊý¾ÝµÄ¶ÀÁ¢´æ´¢Çø
datasetÊý¾Ý´æ´¢µ½±¾µØxmlÎĵµ£¬´úÂë´¦ÀíÈçÏÂ
public static void WriteDataToXML(DataSet dataset, string dataname)
{
try
{
IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForAssembly(); / ......
Ê×ÏÈ£¬¼ÓÔØTXTʵÀý£º
´úÂ룺
ËäÈ»ÊǺܾɵÄÒ»Ì׽̳̣¬¿ÉÊǺÜʵÓã¬ËùÒÔÎÒ°ÑËü·ÅÔÚÕâ¡£
£¨×¢Ò⣺¿´´úÂëµÄʱºòÁôÒâһϽڵãµÄÓ÷¨£ºmyXML.childNodes[0].childNodes[0].childNodes[0]....xml½ÚµãµÄµØ·½¡££©
Ò»¡¢½¨Á¢XML¶ÔÏó£º
var myXML = new XML();
¶þ¡¢ÒýÓÃXMLÎļþ£º
myXML.load("data.xml");
Èý¡¢ºöÂÔ¿Õ¸ñ£º
my ......