- 浏览: 728813 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (419)
- 杂软粉墨 (2)
- 创意灵感 (3)
- 经验记录 (137)
- 开源轨迹 (2)
- sip-communicator (2)
- 闲侃杂谈 (8)
- 问题交流 (24)
- 概念模式 (32)
- 难点备案 (5)
- JwChat (1)
- 中国象棋 (1)
- 教育探索 (6)
- 英语研究 (58)
- 星际争霸 (1)
- 电信知识 (1)
- 软件架构 (3)
- 哲学探索 (26)
- 算法灵魂 (8)
- 近视探索 (6)
- 数学数学 (3)
- 牛角钻尖 (23)
- 至强文言 (3)
- 数据结构 (1)
- 宇宙物理 (2)
- 网络架构 (3)
- 游戏领域 (4)
- 图形处理 (2)
- 修炼之路 (8)
- 读书天地 (20)
- 编解乱码 (2)
- 概念探索 (8)
- 格物致知 (1)
- 其它语言 (1)
- 测试领域 (3)
- 文化风流 (1)
- JQuery (1)
- 網頁領域 (1)
- Unix/Linux (1)
- Inside JVM (1)
- 异常分析 (1)
最新评论
-
suyujie:
引用
HTML <a> 标签灰显禁用 -
suyujie:
HTML <a> 标签灰显禁用 -
suyujie:
HTML <a> 标签灰显禁用 -
suyujie:
HTML <a> 标签灰显禁用 -
iamzhoug37:
您能说一下"局部变量不受文本顺序限制" 是 ...
声明前为什么能赋值却不能输出,都是使用
import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.UnsupportedEncodingException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; public class Test { public static void main(String[] args) { String source = "<Customer_Products><result>0</result><resultMsg>查询成功</resultMsg></Customer_Products>"; InputStream is = null; try { is = new ByteArrayInputStream(source.getBytes("UTF-8")); } catch (UnsupportedEncodingException e1) { e1.printStackTrace(); } Document document = null; DocumentBuilder builder = null; DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { builder = factory.newDocumentBuilder(); document = builder.parse(is); } catch (Exception e) { e.printStackTrace(); } System.out.println("第一个resultMsg消息是:" + document.getFirstChild().getChildNodes().item(1) .getTextContent()); } }
jaxp means java api for xml processing, it's obviously more convenient than dom4j, jdom etc..
The DOM parser is called a DocumentBuilder
, as it builds an in-memory Document
representation. The javax.xml.parsers.DocumentBuilder
is created by the javax.xml.parsers.DocumentBuilderFactory
. The DocumentBuilder
creates an org.w3c.dom.Document
instance, which is a tree structure containing nodes in the XML Document. Each tree node in the structure implements the org.w3c.dom.Node
interface. There are many different types of tree nodes, representing
the type of data found in an XML document. The most important node types
are:
- element nodes that may have attributes
- text nodes representing the text found between the start and end tags of a document element.
from: http://en.wikipedia.org/wiki/Java_API_for_XML_Processing
发表评论
-
关于方法访问控制符protected
2012-11-29 10:38 1200http://bbs.csdn.net/topics/3902 ... -
一个基本问题关于引用的
2012-05-15 10:20 1084问: int a = 1; Integer b = new ... -
我對面向對象和過程的理解。
2012-05-02 08:30 1016我的一些理解。 面向过程,是对客观现象的描述,感觉是有一个上 ... -
stack and heap
2012-01-13 23:17 1013我觉得是根据应用方式 和本身特性 才将内存分区的,目的是提 ... -
program experience conclusion
2011-07-11 15:35 10151. check parameters for validit ... -
PreparedStatement's possible designated parameter
2011-04-29 13:45 942though it's nearly impossible t ... -
clean Log4j
2011-04-12 11:19 1028import org.apache.log4j.BasicCo ... -
about abstract class
2011-04-02 10:34 810yes, we do know abstract class ... -
cvs operations on linux
2011-03-25 09:40 960http://www.linuxhowtos.org/Syst ... -
regex to exchange two parts
2011-03-24 17:09 1012public class Test { public ... -
About the database locking
2011-03-09 11:02 904http://en.wikipedia.org/wiki/Lo ... -
how to send soap message in java
2011-03-08 10:29 1856import java.io.BufferedReader; ... -
About ShutDownDemo
2011-03-07 15:02 924public class ShutdownDemo { p ... -
How do you know if an explicit object casting is needed
2011-02-24 16:33 1123通俗来讲,不可能将一只是猫的动物强转为狗 再说Graphic ... -
有关MimeUtility
2011-02-24 13:11 3299import java.io.UnsupportedEncod ... -
C#连接sql server 2008的一件2事
2011-02-24 09:01 2113once upon a time, i came upon o ... -
Shadowing, Overriding, Hiding and Obscuring
2011-02-22 15:15 1098当子类属性与父类属性重叠时 这种叫法上是shadowi ... -
运行一个类,如果classpath中路径带空格就加双引号
2011-02-11 11:25 2763注意是这样加: java -cp .;"d:\my ... -
关于ClassPath中的current directory
2011-01-28 16:40 1115Given: 1. package com.company. ... -
文件内容操作batch
2011-01-27 16:36 1163I've learnt it from csdn qybao( ...
相关推荐
JAXP 专述JAXP 专述JAXP 专述
基于AjaxP的通用查询. 学习ajax的好资料
jaxp-api.jar sax.jar dom.jar xercesImpl.jar
XML有3中解析方式:Jaxp、Jdom和dom4j 这个是sun公司提供的简单的Jaxp解析方式。
计算机科学与技术专业使用JAXP之SAX读取XML内容~~
基于java的开发源码-JAXP数据验证引擎 Serene.zip 基于java的开发源码-JAXP数据验证引擎 Serene.zip 基于java的开发源码-JAXP数据验证引擎 Serene.zip 基于java的开发源码-JAXP数据验证引擎 Serene.zip 基于java的...
JAXP数据验证引擎 Serene
JAXP是JAVA API for XML Processing的缩写。本教程属于清晰版
Distributed by CDG Books Canada Inc. for Canada; by Transworld Publishers Limited in the United Kingdom; by IDG Norge Books for Norway; by IDG Sweden Books for Sweden; by IDG Books ...
供学习java xml参考
JAXP数据验证引擎 Serene.7z
JSR 206 Java API for XML Processing (JAXP) 1.3
Apache ServiceMix Specs :: JAXP API 1.3
基于Java的JAXP数据验证引擎 Serene.zip
基于java的JAXP数据验证引擎 Serene.zip
java源码:JAXP数据验证引擎 Serene.zip
Java promises "portable code" and XML assures "portable data". These two technologies can be used together to architect enterprise ... This time, we ll focus on Java API for XML Processing (or JAXP).
基于Java的源码-JAXP数据验证引擎 Serene.zip
Working with XML The Java API for Xml Parsing (JAXP) Tutorial
基于Java的实例源码-JAXP数据验证引擎 Serene.zip