帮我检查一下这个XML的错误 - Web 开发 / XML/SOAP
这个XML总是报这个错:Open quote is expected for attribute "{1}" associated with an element type "using".
为什么?
XML code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE databases [
<!ELEMENT databases (database+)>
<!ATTLIST databases
using IDREF #REQUIERD
>
<!ELEMENT database (driver,url,userName,password)>
<!ATTLIST database
id ID #REQUIERD
>
<!ELEMENT driver (#PCDATA)>
<!ELEMENT url (#PCDATA)>
<!ELEMENT userName (#PCDATA)>
<!ELEMENT password (#PCDATA)>
]>
<databases using="mysql">
<database id="mysql">
<driver>com.mysql.jdbc.Driver</driver>
<url>mysql://localhost:3306/test</url>
<userName>root</userName>
<password>sss</password>
</database>
<database id="sqlserver">
<driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver>
<url>sqlserver://ip:port;database=DBName</url>
<userName>sa</userName>
<password>sss</password>
</database>
</databases>
第二个
<database id="sqlserver">
中间的字符错了,应该是空格
相关问答:
DataSet导出xml 批处理(循环)得怎么处理
XML文件
<A>
<B>
<C>
</C>
&nb ......
我有一个类似的xml的 string,想通过遍历怎么个xml 输出我想要的element的值
xml 为:
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>DISCOVER_XML_ME ......
XML文件内容:
- <ResList>
<page>0</page>
- <resItem>
<resName>WWW</resName>
</resItem>
- <resItem>
&nb ......
下面是XML初始文件内容
XML code:
<upd:Update xmlns:lar="http://schemas.microsoft.com/msus/2002/12/LogicalApplicabilityRules" xmlns:cmd="http://schemas.microsoft.com/msus/2002/12/Up ......
<?xml version="1.0" encoding="utf-8" ?>
<HuiSin>
<admin>100,100</admin>
<user>200,200</user>
怎样在这里添加一个新的呢?
< ......