




已阅读5页,还剩23页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
上机题1、 XML 指南 XML入门简介 什么是HTML 什么是XML XML语法 XML元素必须有结束标签 XML元素必须正确的嵌套 2、1张三32男上海2李四22男北京3、1tom1002mary98第三章上机题1、 2、Environment Protection Material waste &PUBLISHER;it means the waste of substance or things from which something else can be made. For example, people throw away the used metal products and buy a new one, so the old metal waste accumulates. At last, they become waste. For example, when people finish reading newspaper, the paper will become waste. When the glass is broken, it also becomes waste. Nobody wants to use a broken window or drink with a broken glass or wear a pair of broken glasses. Once it is broken, it becomes waste. The rate of using plastics is increasing day by day. People use plastic bags because they are convenient. When they get home, they throw the plastics way, paying no attention to the environment. The more convenience plastics brings to us, the more plastic waste is produced. This is called “white pollution” as most plastics are white. Some of our products we use every day are made of rubber, just like the tyres and the bottom part of our shoes. Its true that rubber plays an important role in our life. However, it also brings us some trouble when it has been used for a long time and becomes old. The old tyres become waste because it cant break down by nature. This is really a big problem.Protecting the environment is not one persons duty; it depends on all of us. What can we do? Maybe a dozen. In a word, use what can reuse as much as possible. Remember, environment protection is not ones duty!3、!DOCTYPE NEWSPAPER Environment Protection Material waste &PUBLISHER;it means the waste of substance or things from which something else can be made. For example, people throw away the used metal products and buy a new one, so the old metal waste accumulates. At last, they become waste. For example, when people finish reading newspaper, the paper will become waste. When the glass is broken, it also becomes waste. Nobody wants to use a broken window or drink with a broken glass or wear a pair of broken glasses. Once it is broken, it becomes waste. The rate of using plastics is increasing day by day. People use plastic bags because they are convenient. When they get home, they throw the plastics way, paying no attention to the environment. The more convenience plastics brings to us, the more plastic waste is produced. This is called “white pollution” as most plastics are white. Some of our products we use every day are made of rubber, just like the tyres and the bottom part of our shoes. Its true that rubber plays an important role in our life. However, it also brings us some trouble when it has been used for a long time and becomes old. The old tyres become waste because it cant break down by nature. This is really a big problem.Protecting the environment is not one persons duty; it depends on all of us. What can we do? Maybe a dozen. In a word, use what can reuse as much as possible. Remember, environment protection is not ones duty!第四章上机题1、 2、 3、 第五章上机题1、1)、 订单信息 订单 名称数量城市邮编 2)、 订单信息 订单 名称数量城市邮编 3)、 订单信息 订单 名称数量城市邮编 2、PRODUCTNAMEfont-family:Arial;font-size:20pt;font-weight:bold;color:red;display:block;padding-top:6pt;padding-bottom:6ptPRICE,DESCRIPTION,QUANTITYfont-family:Arial;font-size:10pt;color:green;display:block;padding-top:2pt;padding-bottom:2pt3、 产品名: 描述: 价格: 现有量: 第六章上机题1、打开IE浏览器,并在地址栏中输入URL查询字符串:http:/localhost/XMLTest?sql=select+*from+student+for+xml+RAW&root=roothttp:/localhost/XMLTest?sql=select+*from+ student +for+xml+Auto&root= student2、将数据“bin”、“female”、“30”以XML元素的形式插入到本章的数据库school的student数据表中。注意,分别以元素和属性的形式进行实现。DECLARE doc varchar(1000)DECLARE idoc intSET doc= 5 bin female 30 exec sp_xml_preparedocument idoc output,docselect * from openxml(idoc,/ROOT/student,2)with(id int,name varchar(40),sex varchar(20), age int)insert studentselect * from openxml(idoc,/ROOT/student,2)with studentexec sp_xml_removedocument idoc3、将数据“bin”、“female”、“30”以XML属性的形式插入到本章的数据库school的student数据表中。USE schoolDECLARE doc varchar(1000)DECLARE idoc intSET doc= exec sp_xml_preparedocument idoc output,docselect * from openxml(idoc,/ROOT/student,1)with(id int,name varchar(40),sex varchar(20), age int)insert studentselect * from openxml(idoc,/ROOT/student)with studentexec sp_xml_removedocument idoc第七章上机题1、this is as linked element2、this is as linked element3、 机械工业出版社 这是一本C#编程语言的指南和参考书。C#是一种崭新的面向对象的编程语言。它强调以组件为基础的软件开发方法。 湖南科学技术出版社 时间简史以最通俗的语言,对一些最古老的问题做了阐述, 向人们介绍了什么是宇宙论,以及宇宙论最新的发展状况。 机械工业出版社 这是一本ASP.NET编程语言的指南和参考书。 湖南科学技术出版社 这是一本Java编程语言的指南和参考书。 湖南科学技术出版社 这是一本Java ME编程语言的指南和参考书。 学习ASP.NET的书籍 第八章填空题:1、文档对象模型 2、DOM解析器 3、节点 4、DOMDocument 5、IXMLDOMNode选择题:1、ABCD 2、B 3、D 4、C 5、A简答题:1、答:最常见的节点类型有:(1)、元素:元素是 XML 的基本构件。元素可以有其它元素、文本节点或两者兼有来作为其子节点。元素节点还是可以有属性的唯一类型的节点。 (2)、属性:属性节点包含关于元素节点的信息,但实际上,不认为它是元素的子节点(3)、文本:文本节点是:文本。它可以包含许多信息或仅仅是空白。 (4)、文档(根节点):文档节点是整个文档中所有其它节点的父节点。 2、答:使用XML DOM,可以让我们遍历、读取和操纵XML文档的结构和内容,其主要对象和方法有:(1)、DOMDocument对象:描述全部文档映射表,它包括文档所有信息。对开发人员来说,最重要的编程对象是DOMDocument。 DOMDocument对象通过暴露的属性和方法来允许浏览、查询和修改XML文档的内容和结构(2)、IXMLDOMNode对象:描述文档里的节点,此节点可以是元素、属性、处理指令、文本或其他存储在XML文档里的信息。(3)、IXMLDOMNodeList对象:描述节点对象的集合,可以使用该对象遍历这个集合,可以用数值访问。(4)、IXMLDOMParseError对象:用来验证XML文档对于DTD、XSD的正确性。第九章填空题:1、DOM SAX 2、Document 3、startDocument 4、XMLOutPutter 5、Element选择题:1、B 2、A 3、A 4、B 5、D上机题1、(1)import javax.xml.parsers.*;import org.w3c.dom.*;public class dom public static void main(String args) try DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder=factory.newDocumentBuilder(); Document doc=builder.parse(order.xml); NodeList nl =doc.getElementsByTagName(shipTo); for (int i=0;inl.getLength();i+) Element node=(Element) nl.item(i); System.out.print(name: ); System.out.println (node.getElementsByTagName(name).item(0).getFirstChild().getNodeValue(); System.out.print(street: ); System.out.println (node.getElementsByTagName(street).item(0).getFirstChild().getNodeValue(); System.out.print(city: ); System.out.println (node.getElementsByTagName(city).item(0).getFirstChild().getNodeValue(); System.out.print(state: ); System.out.println (node.getElementsByTagName(state).item(0).getFirstChild().getNodeValue(); System.out.print(zip: ); System.out.println (node.getElementsByTagName(zip).item(0).getFirstChild().getNodeValue(); System.out.println(); NodeList n2 =doc.getElementsByTagName(billTo); for (int i=0;in2.getLength();i+) Element node=(Element) n2.item(i); System.out.print(name: ); System.out.println (node.getElementsByTagName(name).item(0).getFirstChild().getNodeValue(); System.out.print(street: ); System.out.println (node.getElementsByTagName(street).item(0).getFirstChild().getNodeValue(); System.out.print(city: ); System.out.println (node.getElementsByTagName(city).item(0).getFirstChild().getNodeValue(); System.out.print(state: ); System.out.println (node.getElementsByTagName(state).item(0).getFirstChild().getNodeValue(); System.out.print(zip: ); System.out.println (node.getElementsByTagName(zip).item(0).getFirstChild().getNodeValue(); System.out.println(); NodeList n3 =doc.getElementsByTagName(item); for (int i=0;in3.getLength();i+) Element node=(Element) n3.item(i); System.out.print(productName: ); System.out.println (node.getElementsByTagName(productName).item(0).getFirstChild().getNodeValue(); System.out.print(quantity: ); System.out.println (node.getElementsByTagName(quantity).item(0).getFirstChild().getNodeValue(); System.out.print(USPrice: ); System.out.println (node.getElementsByTagName(USPrice).item(0).getFirstChild().getNodeValue(); System.out.print(comment: ); System.out.println (node.getElementsByTagName(comment).item(0).getFirstChild().getNodeValue(); System.out.println(); catch(Exception e) e.printStackTrace(); (2)import javax.xml.parsers.*;import org.w3c.dom.*;import java.io.*;import org.apache.crimson.tree.*;public class InsertElement public static void main(String args) Element items=null; Element item=null; Element productName = null; Element quantity = null; Element USPrice = null; Element shipDate = null; try DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder=factory.newDocumentBuilder(); Document doc=builder.parse(or
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 山东省烟台龙口市2025届初三下学期第三次阶段检测试题数学试题含解析
- 企业职场礼仪培训
- 枣强中学高一上学期第四次月考地理试题
- 2025合同法中合同解除的若干问题
- 急腹症的观察及急救护理
- 2025建筑项目招标投标合同(合同协议书)
- 培训班停课通知与违规办学治理
- 2025委托加工合同范本下载
- 2025深交所指定交易合同
- 2025商品买卖合同
- 2024年水利部珠江水利委员会所属事业单位招聘考试真题
- 建筑行业员工职业道德
- 江苏省徐州市树恩中学2024-2025学年高一下学期第一次月考地理试题(含答案)
- 货车合伙入股协议书
- 汽车行业发展前景
- 【亚洲清洁空气中心】十年清洁空气之路中国与世界同行
- 沥青搅拌站应急预案与响应流程
- 用电知识安全培训课件
- 宁德时代 -2024年度环境、社会与公司治理(ESG)报告
- 2024年行政管理相关自考的试题及答案
- 档案数字化管理试题及答案
评论
0/150
提交评论