1
我想读取我的xml文件中的根元素。 当我从XPath "beans/bean/......"
中读取它时,它工作正常。 XML输入文件的开头:xpath读取根元素
<?xml version="1.0" encoding="UTF-8"?>
<!-- The file defines all the configurations of the SemanticServer -->
<beans>
<bean class="org.spr
但是当我的根元素使用的<beans>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
,而不是它不工作。
我如何读取根元素时,空<beans>
,而不是<beans xmlns="http
......
谢谢!
你想读的根元素豆或它的孩子豆?哦,我们需要你使用的代码/ xpath语句。我在猜测命名空间,但这是一个猜测。 –
例如,我有bean