vorbis
中级会员
 
UID 74545
精华
0
积分 216
帖子 114
金钱 216 喜悦币
威望 0
人脉 0
阅读权限 30
注册 2006-6-6
状态 离线
|
解析 XML 遇到问题
我是用域名注册商提供的 API 来检查一个余名是否被注册,域名注册商的网站返回的是一个 XML 结果。如果 RRPCode 是211,那么域名已经被注册了,如果 RRPCode 是210,那么没被注册,我不知道怎样解析。
<?xml version="1.0"?>
<interface-response>
<Domain>example.com</Domain>
<RRPCode>211</RRPCode>
<RRPText>Domain not available</RRPText>
<AuctionDate-1></AuctionDate-1>
<AuctionID-1></AuctionID-1>
<Domain>example.net</Domain>
<RRPCode>211</RRPCode>
<RRPText>Domain not available</RRPText>
<AuctionDate-1></AuctionDate-1>
<AuctionID-1></AuctionID-1>
<Domain>example.org</Domain>
<RRPCode>211</RRPCode>
<RRPText>Domain name not available</RRPText>
<AuctionDate-1></AuctionDate-1>
<AuctionID-1></AuctionID-1>
<Domain>example.biz</Domain>
<RRPCode>211</RRPCode>
<RRPText>Domain name not available</RRPText>
<AuctionDate-1></AuctionDate-1>
<AuctionID-1></AuctionID-1>
<Domain>example.info</Domain>
<RRPCode>211</RRPCode>
<RRPText>Domain name not available</RRPText>
<AuctionDate-1></AuctionDate-1>
<AuctionID-1></AuctionID-1>
<DomainCount>5</DomainCount>
<RRPCode></RRPCode>
<RRPText></RRPText>
<AuctionDate></AuctionDate>
<AuctionID></AuctionID>
<Command>CHECK</Command>
<Language>eng</Language>
<ErrCount>0</ErrCount>
<ResponseCount>0</ResponseCount>
<MinPeriod></MinPeriod>
<MaxPeriod>10</MaxPeriod>
<Server>RESELLERTEST</Server>
<Site>eNom</Site>
<IsLockable></IsLockable>
<IsRealTimeTLD></IsRealTimeTLD>
<TimeDifference>+0.00</TimeDifference>
<ExecTime>1.692871</ExecTime>
<Done>true</Done>
<debug><![CDATA[]]></debug>
</interface-response>
|
|