Developers using XML

· What is the purpose of XML Namespaces?
XML Namespaces remove conflicts between different documents from different sources.

· When is the DOM appropriate for use? When is it not? Are there size limitations?
Dom is appropriate for small document and the document needs to be modified. It’s not appropriate for big document because of performance issue. There is no size limitation as long as there is enough physical memory.

· What is the one fundamental difference between Elements and Attributes?
Element can contain another elements and attributes. Attributes can only reside inside an element.

· What is the difference between Well-Formed XML and Valid XML?
Well-Formed XML follows xml grammar. Valid XML is validated against xml schema or dtd. A valid xml is well-formed. A well-formed xml might not be valid.

· How would you validate XML using .NET?
Using XmlValidatingReader class.

· Why is this almost always a bad idea? When is it a good idea? myXmlDocument.SelectNodes("//mynode");
This statement returns all elements under mynode. This could return a large amount of data. It’s more efficient to use SelectSingleNode method and pass a full path, or use SelectNodes with a relatively deeper path.

· Describe the difference between pull-style parsers (XmlReader) and eventing-readers (Sax)
In XmlReader you control the parsing and define which element to go to. Sax parses the Xml internally, and raises events whenever it find something interesting.

· What is the difference between XPathDocument and XmlDocument? Describe situations where one should be used over the other.
XpathDocument is not editable. XmlDocument is editable. XpathDocument is used for fast readonly situation. XmlDocument is used when the document needs to be changed.

· What is the difference between an XML "Fragment" and an XML "Document."
XML Fragment is not a full xml document. It doesn’t have element.

· What does it meant to say “the canonical” form of XML?
The purpose of Canonical XML is to define a standard format for an XML document. Canonical XML is a very strict XML syntax, which lets documents in canonical XML be compared directly.
Using this strict syntax makes it easier to see whether two XML documents are the same. For example, a section of text in one document might read Black & White, whereas the same section of text might read Black & White in another document, and even in another. If you compare those three documents byte by byte, they’ll be different. But if you write them all in canonical XML, which specifies every aspect of the syntax you can use, these three documents would all have the same version of this text (which would be Black & White) and could be compared without problem. This Comparison is especially critical when xml documents are digitally signed. The digital signal may be interpreted in different way and the document may be rejected. Why is the XML InfoSet specification different from the Xml DOM? What does the InfoSet attempt to solve?

· Contrast DTDs versus XSDs. What are their similarities and differences? Which is preferred and why?
Both are used for defining the rules of an xml document. DTDs are written in regex, XSDs are written using xml.
Document Type Definition (DTD) describes a model or set of rules for an XML document. XML Schema Definition (XSD) also describes the structure of an XML document but XSDs are much more powerful. The disadvantage with the Document Type Definition is it doesn’t support data types beyond the basic 10 primitive types. It cannot properly define the type of data contained by the tag. An Xml Schema provides an Object Oriented approach to defining the format of an xml document. The Xml schema support most basic programming types like integer, byte, string, float etc., We can also define complex types of our own which can be used to define a xml document. Xml Schemas are always preferred over DTDs as a document can be more precisely defined using the XML Schemas because of its rich support for data representation.

· Does System.Xml support DTDs? How?
Yes, in addition to XDR and XSD schema validation, .NET continues to support the DTD to validate the XML documents. The System.Xml namespace contains a class named XmlValidatingReader that can be used to validate the XML documents.

· Can any XML Schema be represented as an object graph? Vice versa?
Yes.

转载于:https://www.cnblogs.com/laynelin/archive/2010/01/02/1637715.html

转载: .net程序员偏向XML开发的面试题相关推荐

  1. Java程序员转Android开发必读经验

    小编最近几日偷偷的发现部分Java程序员想转安卓开发,故此加紧补充知识,为大家搜集资料,积极整理前人的经验,希望可以给正处于困惑中的你,带来些许的帮助. 啰哩啰嗦的说说Java和Android程序的区 ...

  2. 出版新书《从毕业生到程序员 使用C#开发商业软件》

    新书出版了,ISBN 978-121-18842-8<从毕业生到程序员 使用C#开发商业软件>,定价69元,欢迎购买. 转载于:https://blog.51cto.com/xdesign ...

  3. 11个程序员必备简捷开发辅助工具

    程序员必备简捷开发辅助工具总结 写在前面: 工欲善其事必先利其器,拥有简捷的开发辅助工具能大大提高我们程序猿的开发效率.Melo刚到学校就给大家总结了一些常用的辅助开发的工具,希望大家能喜欢,闲话不多 ...

  4. 女朋友求爱c语言程序,[转载]一个程序员写的求爱程序

    [转载]一个程序员写的求爱程序 set fso=createobject("scripting.filesystemobject") set ws=wscript.createob ...

  5. 学python用什么软件开发-5款Python程序员高频使用开发工具推荐

    很多Python学习者想必都会有如下感悟:最开始学习Python的时候,因为没有去探索好用的工具,吃了很多苦头.后来工作中深刻体会到,合理使用开发的工具的便利和高效.今天,我就把Python程序员使用 ...

  6. 30岁自学python找工作-程序员自学Python开发,20到30岁几乎决定了你的未来!

    原标题:程序员自学Python开发,20到30岁几乎决定了你的未来! 之前程序员界流行一句话:人生苦短,请用Python. 随着Python成为网红语言之后,不少程序员想多学这一门语言好傍身. 甚至有 ...

  7. 黑马程序员Linux系统开发视频之创建守护进程模型

    黑马程序员Linux系统开发视频之创建守护进程模型 1.创建子进程,父进程退出   所有工作在子进程中进行形式上脱离了控制终端 2.在子进程中创建新会话   setsid()函数   使子进程完全独立 ...

  8. net程序员的iPhone开发-MonoTouch

    net程序员的iPhone开发-MonoTouch iPhone软件的Native开发除了使用Apple推荐的Objective-C  Cocoa之外,也有其他的一些工具和SDK提供 基于WEB的形式 ...

  9. fish工具_Python程序员使用哪些开发工具

    Python程序员使用哪些开发工具?很多Python学习者想必都会有如下感悟:最开始学习Python的时候,因为没有去探索好用的工具,吃了很多苦头.后来工作中深刻体会到,合理使用开发的工具的便利和高效 ...

最新文章

  1. 基础才是重中之重~何为原子化操作
  2. 神经网络设计与分析之sin函数拟合分析
  3. UVA - 1346 Songs (贪心+排序)
  4. Spring boot的properties文件编码设置
  5. Cannot convert type ‘ASP.login_aspx’ to ‘System.Web.UI.WebControls.Login’的解决方法
  6. Visual Studio 2019 RC入门——第1部分
  7. JS根据分数,计算名次(分数相同名次相同)
  8. 获取extjs 选择后的表头_OD数据获取脚本分享
  9. static关键字_void和void指针_函数指针
  10. 读《About Face 4 交互设计精髓》2
  11. 微信小程序经典开源代码汇总
  12. 18.10.29 POJ 3987 Computer Virus on Planet Pandora(AC自动机+字符串处理)
  13. 中职计算机应用专业核心素养的,基于职业发展的中职学生核心素养的研究与培养...
  14. elasticsearch2.4.1+kibana4.6.1+mavel2.4.1
  15. ATA工厂测试AT_MODE下震动不振问题分析
  16. 第一次竞赛-A.质数的最大乘积
  17. MySQL中强大的mysqladmin
  18. CATIA CAA二次开发专题(八)---自定义特征模型
  19. dplayer解析源码php调用,从demo分析ijk源码一:视频播放
  20. 物联卡可以装手机上吗 物联卡放手机容易封号

热门文章

  1. [大学回忆录-思想]找工作:也谈谈我的专业技能
  2. Windows下的Makefile
  3. 【算法】剑指 Offer 59 - II. 队列的最大值
  4. 【kafka】kafka 查看 GroupCoordinator 以及 kafka Group dead 消费组死掉 以及 GroupCoordinatorRequest 使用
  5. 【Elasticsearch】elasticsearch bool 布尔 查询
  6. 【MySQL】mysql show操作简单示例
  7. 源代码:spark-shell解读
  8. kudu:插入报错:Row error for primary key=9, tablet=null, server=xx, status=Not found: key not found
  9. 【hive】hive权限
  10. SpringBoot目录