什么是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.
相关文档:
#include <iostream>
#include "1.h"
int main(int argc, char *argv[])
{
try
{
SXmlDOM dom;
//dom.parse("<?xml?><书店><书本 书名="VC++" 价格="50" 折扣= ......
Android 是针对移动设备的一种新兴的开源操作系统和 SDK。借助它,您可以创建功能强大的移动应用程序。当您的应用程序可以访问 Web 服务时,其吸引力会大大增加,这意味着您需要使用 Web 语言:XML。在本文中,您将了解在 Android 上使用 XML 的不同方法,以及如何使用它们构建自己的 Android 应用程序。
入门
在本文中 ......
IsolatedStorageFile:包含文件和数据的独立存储区
dataset数据存储到本地xml文档,代码处理如下
public static void WriteDataToXML(DataSet dataset, string dataname)
{
try
{
IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForAssembly(); / ......
/**
* 描述:数据库初始化基本类
*
* @作者 王群
* @创建日期 2010-04-08
* @修改人 xxx
* @修改日期 xxx
* @检查人 xxx
* @检查日期 xxx
*/
import java.sql.SQLException;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.oumasoft.bstmanage.ibatis.SqlMapConfig;
import com.oumasof ......
使用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( ......