php下通过xml_parse解析xml文件
来源:互联网 发布:linux命令vi的使用 编辑:程序博客网 时间:2024/06/10 13:56
xml_parse解析xml文件时候,
很有可能不仅仅调用一次character_handler。
所以在获得xml节点的文本信息的时候,要用连接运算".="。
参考 http://jp2.php.net/manual/ro/function.xml-set-character-data-handler.php
ken at positive-edge dot com
30-Jan-2002 01:20
30-Jan-2002 01:20
the function handler is called several times when it parses the character data. It doesn't return the entire string as it suggests. There are special exceptions that will always force the parser to stop scanning and call the character data handler. This is when:
- The parser runs into an Entity Declaration, such as & (&) or ' (�)
- The parser finishes parsing an entity
- The parser runs into the new-line character (/n)
- The parser runs into a series of tab characters (/t)
And perhaps others.
For instance, if we have this xml content:
<mytag name=�Ken Egervari� title=�Chief Technology Officer�>
Ken has been Positive Edge's Chief Technology Officer for 2 years.
</mytag>
The parser will call the character data handler 6 times. This is what will happen:
1 /n
2 /t
3 Ken has been Positive Edge
4 �
5 s Chief Technology Officer for 2 years.
6 /n
I hope that helps people out.
- php下通过xml_parse解析xml文件
- PHP解析XML文件
- php解析xml文件
- php解析xml文件
- Php 解析XML文件
- Php 解析XML文件
- 通过Pull解析器解析xml文件
- PHP解析XML文件类
- php如何通过dom解析xml
- PHP通过DOMDocument操作解析xml
- php通过xpath解析xml数据
- php官方网---php解析xml文件
- dom4j下解析xml文件
- android下通过xstream解析XML
- 通过libxml库解析XML文件方法
- 通过Pull解析器生成xml文件
- 通过Dom方式解析xml文件
- 通过Sax方式解析xml文件
- php下遇到 Cannot modify header information 的警告
- ACE日期时间类
- 类的设计概述
- [转]PHP经典面试题50道
- 微软四月份安全补丁提前通知
- php下通过xml_parse解析xml文件
- 面试中八大经典问题的对应方法
- 2005 交叉表。行转列
- Static in C# .NET
- [ 转]PHP中VC6 X86和VC9 X86的区别及 Non Thread Safe的意思
- 网络编程知识
- weblogic常见问题Q&A
- H.264句法和语法总结(二)NAL层句法
- oracle初始化参数文件管理