使用xmlbeans遇到的问题解决
来源:互联网 发布:音悦台mac版 编辑:程序博客网 时间:2024/05/01 10:08
1.问题: XMLBeans Weblogic8.1冲突
To override the weblogic.jar with your own QName.jar, your need to do the following:
Add the QName JAR file (qname.jar) into the WEB-INF/lib folder in your WAR file
Add a file weblogic.xml into the WEB-INF folder in your WAR file
Below is an example weblogic.xml file:
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN"
"http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd"><weblogic-web-app> <container-descriptor> <prefer-web-
inf-classes>true</prefer-web-inf-classes> </container-descriptor></weblogic-web-app>
注:当WEB-INF目录下的包与系统CLASSPATH所设定的第三方包相同的时候,缺省情况下Weblogic会优先使用CLASSPATH下的那个包。如果想使用
WEB-INF下面的包,需要在weblogic.xml下面配置
<weblogic-web-app>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
2.问题:在生成的xml中加上xsi:schemaLocation attribute
How can I instruct XMLBeans to add the xsi:schemaLocation attribute
to my documents?
Here's how to do it. Assume that you have a document represented by
the doc XmlObject (obtained via TestDocument.Factory.newInstance()
or TestDocument.Factory.parse()) and you need an xsi:schemaLocation
attribute on it, with value from the location String.
加上:
XmlCursor cursor = doc.newCursor();
if (cursor.toFirstChild())
{
cursor.setAttributeText(new QName
("http://www.w3.org/2001/XMLSchema-instance","noNamespaceSchemaLocation"),
location);
}
- 使用xmlbeans遇到的问题解决
- XmlBeans的使用
- XMLBEANS的使用总结
- XmlBeans的使用
- XMLBEANS的使用总结
- XMLBEANS的使用总结
- XMLBEANS的使用总结
- XMLBEANS的使用总结
- XMLBEANS的使用总结
- XmlBeans的使用(转)
- Xmlbeans使用
- xmlbeans使用
- IDEA 使用遇到的问题解决
- 移:使用没有名字空间的xmlbeans
- XMLBEANS的使用总结[调试笔记]
- xmlbeans使用中碰到的问题
- jaxb 使用遇到的问题解决的方案
- CKEditor使用中遇到的问题解决
- 被谁感动【转】
- mod_gzip配置说明
- U-BOOT的启动流程及移植
- NOR和NAND Flash存储器的区别
- 在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败
- 使用xmlbeans遇到的问题解决
- 沉痛的一天
- proxool池应用
- 乱写点东西
- 我的2007 -- 成长,忙碌,变迁,迷惘,期待…… (转)
- 求解!
- 什么...
- 在Eclipse中显示JVM当前内存使用量
- 正则的处理