xml 中的xsi 是什么意思

问题描述

xml 中的xsi 是什么意思

想请问 xml中这几行代码究竟是什么意思啊?

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

新建xml文件时这几行代码要自己徒手敲上去吗。。

解决方案

xsi全名:xml schema instance

web-app是web.xml的根节点标签名称
version是版本的意思
xmlns是web.xml文件用到的命名空间
xmlns:xsi是指web.xml遵守xml规范
xsi:schemaLocation是指具体用到的schema资源

你不要看相关中文资料,看了就不明白了,schema就是schema~你把他翻译成对文档的限制就行了。你可能会说,dtd才是,实际上xsd和dtd是一样的~~

时间: 2024-08-29 09:48:12

xml 中的xsi 是什么意思的相关文章

struts2.0-在web.xml中添加了OpenSessionInViewFilter依然有延迟加载的错误

问题描述 在web.xml中添加了OpenSessionInViewFilter依然有延迟加载的错误 web.xml <?xml version="1.0" encoding="UTF-8"?> xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocat

context:property-placeholder 不能解析xml中配置的键值

问题描述 context:property-placeholder 不能解析xml中配置的键值 org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 9 in XML document from URL [file:/E:/PT/Installtomcat/webapps/SSHTest1/WEB-INF/classes/applicationContext.xml] is invalid; nes

Spring中引用不同xml中的bean

想要在Spring-Common.xml中引用 Spring-Output.xml中定义的bean 需要使用<ref bean="XXX"/>标签,如果是同一个xml文件中引用则使用<ref local="XXX"/>标签. package com.spring.output; public class OutputHelper { IOutputGenerator outputGenerator; public void generateO

java的web.xml中context-param与init-param的区别介绍

web.xml中<context-param>与<init-param>的区别在于<context-param>设置的是一个在应用中全局(ServletContext范围内)可见的参数,而<init-param>设置的是一个在应用中局部(ServletRequest范围内)可见的参数. <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi=

PHP往XML中添加节点的方法

 这篇文章主要介绍了PHP往XML中添加节点的方法,涉及php操作XML文件的技巧,具有一定参考借鉴价值,需要的朋友可以参考下     本文实例讲述了PHP往XML中添加节点的方法.分享给大家供大家参考.具体方法如下: 1. contacts.xml代码 代码如下: <contact id="43956"> <personal> <name> <first>J</first> <middle>J</middl

lash轮播+ js+ xml+-几个flash轮播,求把XML中的参数直接写入js或者静态html中

问题描述 几个flash轮播,求把XML中的参数直接写入js或者静态html中 js部分: <!-- var so = new SWFObject(""/home/home_features.swf""visualMovie""935""470""9""#ffffff""); so.addParam(""wmode""tr

pom xml-maven项目中servlet.xml中出现 &amp;amp;quot;oscache:config&amp;amp;quot; is not bound.错误

问题描述 maven项目中servlet.xml中出现 "oscache:config" is not bound.错误 在pom.xml中加了依赖oscache的jar包.代码如下:com.opensymphonyoscache2.4.1 在servlet.xml中出现The prefix ""oscache"" for element ""oscache:config"" is not bound.错误

XML 中的常见问题(二)

Internet Explorer 5.0 对 XML 提供哪个级别的支持? Internet Explorer 5 提供下列 XML 支持: 直接查看 XML.Microsoft XML 实现允许用户通过他们的 Web 浏览器使用 XSL 或者层叠样式表 (CSS) 查看 XML,就象查看 HTML 文档一样. 高性能.验证 XML 引擎.Internet Explorer 4.0 开发人员熟悉的 XML 引擎已经得到了很大的增强,并且完全支持 W3C XML 1.0 和 XML 名称空间,这

JSP取得在WEB.XML中定义的参数

js|web|xml 在WEB.XML文件中设置参数: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <we