问一个问题,读取XML数据问题。 ( 积分: 100 )

  • 主题发起人 主题发起人 pqzemily
  • 开始时间 开始时间
P

pqzemily

Unregistered / Unconfirmed
GUEST, unregistred user!
Function GetPicSize(CtrolStyleObj,FieldName,ByRef AHeight, ByRef AWidth)
ACount=CtrolStyleObj(0).childNodes.length - 1
for i=0 to ACount
response.Write("***********Value="+CtrolStyleObj(0).childNodes.item(i).attributes.item(0).text+"<br>")
if Trim(CtrolStyleObj(0).childNodes.item(i).attributes.item(0).text)=Trim(FieldName) then
AWidth=CtrolStyleObj(0).childNodes.item(i).attributes.item(1).text
AHeight=CtrolStyleObj(0).childNodes.item(i).attributes.item(2).text
exit for
end if
next
End Function
这是我写的一个函数,在大多数情况下运行正常,但在个别情况下会出现IIS死机,比如说如下XML,
<ControlStyle Tableheight="558">
<Control ControlName="one.testimg.-1"
Controlwidth="240"
Controlheight="288"
Stringlen="0"
defaultvalue=""
bgcolor="#FFFFFF"></Control>
<Control ControlName="one.one.1"
Controlwidth="180"
Controlheight="30"
Stringlen="0"
defaultvalue="1111"
bgcolor="#FFFFFF"></Control>
<Control ControlName="one.one.2"
Controlwidth="180"
Controlheight="30"
Stringlen="50"
defaultvalue=""
bgcolor="#FFFFFF"></Control>
<Control ControlName="one.one.3"
Controlwidth="180"
Controlheight="30"
Stringlen="50"
defaultvalue=""
bgcolor="#FFFFFF"></Control>
<Control ControlName="one.one.4"
Controlwidth="180"
Controlheight="30"
Stringlen="50"
defaultvalue=""
bgcolor="#FFFFFF"></Control>
<Control ControlName="one.one.5"
Controlwidth="180"
Controlheight="30"
Stringlen="50"
defaultvalue=""
bgcolor="#FFFFFF"></Control>
<Control ControlName="one.one.6"
Controlwidth="180"
Controlheight="30"
Stringlen="50"
defaultvalue=""
bgcolor="#FFFFFF"></Control>
<Control ControlName="one.one.7"
Controlwidth="180"
Controlheight="60"
Stringlen="0"
defaultvalue=""
bgcolor="#FFFFFF"></Control>
</ControlStyle>
 
Function GetPicSize(CtrolStyleObj,FieldName,ByRef AHeight, ByRef AWidth)
ACount=CtrolStyleObj(0).childNodes.length - 1
for i=0 to ACount
response.Write("***********Value="+CtrolStyleObj(0).childNodes.item(i).attributes.item(0).text+"<br>")
if Trim(CtrolStyleObj(0).childNodes.item(i).attributes.item(0).text)=Trim(FieldName) then
AWidth=CtrolStyleObj(0).childNodes.item(i).attributes.item(1).text
AHeight=CtrolStyleObj(0).childNodes.item(i).attributes.item(2).text
exit for
end if
next
End Function
这是我写的一个函数,在大多数情况下运行正常,但在个别情况下会出现IIS死机,比如说如下XML,
<ControlStyle Tableheight="558">
<Control ControlName="one.testimg.-1"
Controlwidth="240"
Controlheight="288"
Stringlen="0"
defaultvalue=""
bgcolor="#FFFFFF"></Control>
<Control ControlName="one.one.1"
Controlwidth="180"
Controlheight="30"
Stringlen="0"
defaultvalue="1111"
bgcolor="#FFFFFF"></Control>
<Control ControlName="one.one.2"
Controlwidth="180"
Controlheight="30"
Stringlen="50"
defaultvalue=""
bgcolor="#FFFFFF"></Control>
<Control ControlName="one.one.3"
Controlwidth="180"
Controlheight="30"
Stringlen="50"
defaultvalue=""
bgcolor="#FFFFFF"></Control>
<Control ControlName="one.one.4"
Controlwidth="180"
Controlheight="30"
Stringlen="50"
defaultvalue=""
bgcolor="#FFFFFF"></Control>
<Control ControlName="one.one.5"
Controlwidth="180"
Controlheight="30"
Stringlen="50"
defaultvalue=""
bgcolor="#FFFFFF"></Control>
<Control ControlName="one.one.6"
Controlwidth="180"
Controlheight="30"
Stringlen="50"
defaultvalue=""
bgcolor="#FFFFFF"></Control>
<Control ControlName="one.one.7"
Controlwidth="180"
Controlheight="60"
Stringlen="0"
defaultvalue=""
bgcolor="#FFFFFF"></Control>
</ControlStyle>
 
delphi ado component read xml
 

Similar threads

I
回复
0
查看
850
import
I
I
回复
0
查看
2K
import
I
I
回复
0
查看
696
import
I
后退
顶部