`

XML questions

    博客分类:
  • java
 
阅读更多
1.Which is better to store data as elements or as attributes?

2.Why use an XML document as opposed to other types of documents like a text file etc?

3.Explain where your project needed XML documents?
config and transfer data

4.How do you write comments in an XML document?
<!-- 这里写注释-->

5.How will you embed an XML content within an XML document?

6.How do you write an attribute value with single quotes? How do you write an element value of “> 500.00”?
XML 属性名称是区分大小写的,比如 Name 和 name 就表示两个不同的属性。
XML 属性的值应用引号围起来,你可以用双引号,也可以用单引号,以下的写法都是正确的。不过通常来说,XML 属性采用双引号。
<book ISBN ="9787544238212">
<book ISBN ='9787544238212'>
如果属性的值里包含双引号,就用单引号包围属性值,比如:
<site info ='wo"you"xian.net'>
如果属性值里包含单引号,就用双引号包含属性值。
<site info ="wo'you'xian.net">

7.What is a well-formed XML document?

8.What is XPATH? What is XSLT/XSL/XSL-FO/XSD/DTD etc? What is JAXB? What is JAXP?
XPath 是一门在 XML 文档中查找信息的语言。XPath 用于在 XML 文档中通过元素和属性进行导航。
  什么是 XPath?
  XPath 使用路径表达式在 XML 文档中进行导航
  XPath 包含一个标准函数库
  XPath 是 XSLT 中的主要元素
  XPath 是一个 W3C 标准

XSLT是扩展样式表转换语言(Extensible Stylesheet Language Transformations)的简称,这是一种对XML文档进行转化的语言,XSLT中的T代表英语中的“转换”(transformation)。它是XSL(Extensiblestylesheetlanguage)规范的一部分。

http://www.w3school.com.cn/xslfo/xslfo_intro.asp

JAXB(Java Architecture for XML Binding) 是一个业界的标准,是一项可以根据XML Schema产生Java类的技术。该过程中,JAXB也提供了将XML实例文档反向生成Java对象树的方法,并能将Java对象树的内容重新写到XML实例文档。从另一方面来讲,JAXB提供了快速而简便的方法将XML模式绑定到Java表示,从而使得Java开发者在Java应用程序中能方便地结合XML数据和处理函数。

JDK中JAXB相关的重要Class和Interface:
  JAXBContext类,是应用的入口,用于管理XML/Java绑定信息。
  Marshaller接口,将Java对象序列化为XML数据。
  Unmarshaller接口,将XML数据反序列化为Java对象。

JAXP是Java API for XML Processing的英文字头缩写,中文含义是:用于XML文档处理的使用Java语言编写的编程接口。JAXP支持DOM、SAX、XSLT等标准。为了增强JAXP使用上的灵活性,开发者特别为JAXP设计了一个Pluggability Layer,在Pluggability Layer的支持之下,JAXP既可以和具体实现DOM API、SAX API 的各种XML解析器(XML Parser,例如Apache Xerces)联合工作,又可以和具体执行XSLT标准的XSLT处理器(XSLT Processor,例如Apache Xalan)联合工作。
  由于问题太多,从JDK1.7开始删除该功能。

web service:
1.How would you publish and find WSDL descriptions? What are the 4 primary UDDI data types?
http://www.w3school.com.cn/wsdl/index.asp
http://www.w3school.com.cn/wsdl/wsdl_uddi.asp

2.How can a client application make a request to a Web service?

3.What is Apache AXIS?
http://blog.csdn.net/java_xiang/article/details/1639011

4.What is WSDL? How would you use a WSDL file?
http://blog.csdn.net/top_keki/article/details/4056464

5.What is a Web service, and how does it relate to SOAP? What is a common transport for SOAP messages?
http://www.w3school.com.cn/webservices/index.asp
http://www.w3school.com.cn/soap/index.asp

6.Why use Web services when you can use traditional style middleware such as RPC, CORBA, RMI and DCOM?

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics