Problemmer ved asp oprettelse af xlm fil
hej jeg har et problem med en xml fil som jeg oprette udfra DB indhold via asp, den xml fil jeg opretter bruges i en flash fil så generer en menu udfra den. Når jeg køre flas filen sammen med den "orginale xml" så er der ingen problemmer men hvis jeg prøver med den som er lavet via asp så er knapperne usynlige ? og jeg kan ikke finde nogle forskelle på de to xml dokumenter!Her er de to xml filer
Orginal:
<?xml version="1.0"?>
<flashwebmenu>
<settings key="477220D42D90CDA1" closetime="100" type="vertizal" align="left" valign="middel" margin="60,79,0,0"/>
<style name="style1">
<menu color="FFFFFF" alpha="0" left="4" top="4" padding="2,2,2,2" />
<item width="120" height="0" space="2" target="_self">
<normal color="FFFFFF" alpha="0">
<text color="333333" size="8" face="Arial" align="left" valign="bottom" bold="false" italic="false" underline="false" />
<arrow color="333333" alpha="100" width="4" height="4" />
</normal>
<over>
<text color="ef9306" />
<arrow color="333333" width="4" height="4" />
</over>
<down>
<text color="ef9306" />
<arrow color="333333" alpha="100" />
</down>
</item>
</style>
<style name="style2" parent="style1">
<menu color="FFFFFF" alpha="90" left="4" top="4" padding="2,2,2,2" />
<item width="120" height="0" space="2" target="_self">
<normal color="FFFFFF" alpha="90">
<text color="333333" size="8" face="Arial" align="left" valign="bottom" bold="false" italic="false" underline="false" />
<arrow color="333333" alpha="100" width="4" height="4" />
</normal>
<over>
<text color="ef9306" />
<arrow color="333333" width="4" height="4" />
</over>
<down>
<text color="ef9306" />
<arrow color="333333" alpha="100" />
</down>
</item>
</style>
<style name="style3" parent="style2">
<menu color="FFFFFF" alpha="90" left="4" top="4" padding="2,2,2,2" />
<item width="120" height="0" space="2" target="_self">
<normal color="FFFFFF" alpha="90">
<text color="333333" size="8" face="Arial" align="left" valign="bottom" bold="false" italic="false" underline="false" />
<arrow color="333333" alpha="100" width="4" height="4" />
</normal>
<over>
<text color="ef9306" />
<arrow color="333333" width="4" height="4" />
</over>
<down>
<text color="ef9306" />
<arrow color="333333" alpha="100" />
</down>
</item>
</style>
<!-- Menu start -->
<menu style="style1">
<item lable="Page Content" href="page_content.asp?ConId=1&ConType=htm&Fla=yes"/>
</menu>
</flashwebmenu>
og her er den asp laver:
<?xml version="1.0"?>
<flashwebmenu>
<settings key="477220D42D90CDA1" closetime="100" type="vertizal" align="left" valign="middel" margin="60,79,0,0"/>
<style name="style1">
<menu color="FFFFFF" alpha="0" left="4" top="4" padding="2,2,2,2" />
<item width="120" height="0" space="2" target="_self">
<normal color="FFFFFF" alpha="0">
<text color="333333" size="8" face="Arial" align="left" valign="bottom" bold="false" italic="false" underline="false" />
<arrow color="333333" alpha="100" width="4" height="4" />
</normal>
<over>
<text color="ef9306" />
<arrow color="333333" width="4" height="4" />
</over>
<down>
<text color="ef9306" />
<arrow color="333333" alpha="100" />
</down>
</item>
</style>
<style name="style2" parent="style1">
<menu color="FFFFFF" alpha="80" left="4" top="4" padding="2,2,2,2" />
<item width="120" height="0" space="2" target="_self">
<normal color="FFFFFF" alpha="0">
<text color="333333" size="8" face="Arial" align="left" valign="bottom" bold="false" italic="false" underline="false" />
<arrow color="333333" alpha="100" width="4" height="4" />
</normal>
<over>
<text color="ef9306" />
<arrow color="333333" width="4" height="4" />
</over>
<down>
<text color="ef9306" />
<arrow color="333333" alpha="100" />
</down>
</item>
</style>
<style name="style3" parent="style2">
<menu color="FFFFFF" alpha="80" left="4" top="4" padding="2,2,2,2" />
<item width="120" height="0" space="2" target="_self"><normal color="FFFFFF" alpha="0">
<text color="333333" size="8" face="Arial" align="left" valign="bottom" bold="false" italic="false" underline="false" />
<arrow color="333333" alpha="100" width="4" height="4" />
</normal>
<over>
<text color="ef9306" />
<arrow color="333333" width="4" height="4" />
</over>
<down>
<text color="ef9306" />
<arrow color="333333" alpha="100" />
</down>
</item>
</style>
<menu style="style1">
<item lable="Page Content" href="page_content.asp?ConId=1&ConType=htm&Fla=yes"/>
</menu
></flashwebmenu>
og asp koden jeg har brugt se sådan her ud:
<%
start = "<?xml version=""1.0""?>"
start = start & "<flashwebmenu>"
start = start & "<settings key=""477220D42D90CDA1"" closetime=""100"" type=""vertizal"" align=""left"" valign=""middel"" margin=""60,79,0,0""/>"
start = start & "<style name=""style1"">"
start = start & "<menu color=""FFFFFF"" alpha=""0"" left=""4"" top=""4"" padding=""2,2,2,2"" />"
start = start & "<item width=""120"" height=""0"" space=""2"" target=""_self"">"
start = start & "<normal color=""FFFFFF"" alpha=""0"">"
start = start & "<text color=""333333"" size=""8"" face=""Arial"" align=""left"" valign=""bottom"" bold=""false"" italic=""false"" underline=""false"" />"
start = start & "<arrow color=""333333"" alpha=""100"" width=""4"" height=""4"" />"
start = start & "</normal>"
start = start & "<over>"
start = start & "<text color=""ef9306"" />"
start = start & "<arrow color=""333333"" width=""4"" height=""4"" />"
start = start & "</over>"
start = start & "<down>"
start = start & "<text color=""ef9306"" />"
start = start & "<arrow color=""333333"" alpha=""100"" />"
start = start & "</down>"
start = start & "</item>"
start = start & "</style>"
start = start & "<style name=""style2"" parent=""style1"">"
start = start & "<menu color=""FFFFFF"" alpha=""80"" left=""4"" top=""4"" padding=""2,2,2,2"" />"
start = start & "<item width=""120"" height=""0"" space=""2"" target=""_self"">"
start = start & "<normal color=""FFFFFF"" alpha=""0"">"
start = start & "<text color=""333333"" size=""8"" face=""Arial"" align=""left"" valign=""bottom"" bold=""false"" italic=""false"" underline=""false"" />"
start = start & "<arrow color=""333333"" alpha=""100"" width=""4"" height=""4"" />"
start = start & "</normal>"
start = start & "<over>"
start = start & "<text color=""ef9306"" />"
start = start & "<arrow color=""333333"" width=""4"" height=""4"" />"
start = start & "</over>"
start = start & "<down>"
start = start & "<text color=""ef9306"" />"
start = start & "<arrow color=""333333"" alpha=""100"" />"
start = start & "</down>"
start = start & "</item>"
start = start & "</style>"
start = start & "<style name=""style3"" parent=""style2"">"
start = start & "<menu color=""FFFFFF"" alpha=""80"" left=""4"" top=""4"" padding=""2,2,2,2"" />"
start = start & "<item width=""120"" height=""0"" space=""2"" target=""_self"">"
start = start & "<normal color=""FFFFFF"" alpha=""0"">"
start = start & "<text color=""333333"" size=""8"" face=""Arial"" align=""left"" valign=""bottom"" bold=""false"" italic=""false"" underline=""false"" />"
start = start & "<arrow color=""333333"" alpha=""100"" width=""4"" height=""4"" />"
start = start & "</normal>"
start = start & "<over>"
start = start & "<text color=""ef9306"" />"
start = start & "<arrow color=""333333"" width=""4"" height=""4"" />"
start = start & "</over>"
start = start & "<down>"
start = start & "<text color=""ef9306"" />"
start = start & "<arrow color=""333333"" alpha=""100"" />"
start = start & "</down>"
start = start & "</item>"
start = start & "</style>"
start = start & "<menu style=""style1"">"
slut = "</menu></flashwebmenu>"
Get_Btn_1_Id_SQL = "SELECT * FROM Btn_1 where Item_Deleted = 'no' and Btn_1_Status = 'published'"
Set Get_Btn_1_Id = Conn.Execute(Get_Btn_1_Id_SQL)
'Hvis der er nogle btn_1'er
if not Get_Btn_1_Id.EOF then
Do
Get_Btn_1_Text_SQL = "Select * From Btn_1_Text Where Language = 'US' and Btn_1_Id = '"& Get_Btn_1_Id("Btn_1_Id") &"'"
Set Get_Btn_1_Text = Conn.Execute(Get_Btn_1_Text_SQL)
If Not Get_Btn_1_Text.EOF Then
'Hvis der er en Btn_1_text hvis sprog eller id passer til btn_1
Get_Btn_1_Content_SQL = "Select * From Btn_1_Content Where Btn_1_Id = '"& Get_Btn_1_Id("Btn_1_Id") &"'"
set Get_Btn_1_Content = Conn.Execute(Get_Btn_1_Content_SQL)
Select Case Get_Btn_1_Content("Content_Type")
Case "Button"
'Hvis Btn_1_Content er knapper
Case "Htm"
'Hvis Btn_1_Content er htm
Get_Btn_1_Htm_SQL = "Select * From Btn_1_HtmContent Where Btn_1_Id = '"& Get_Btn_1_Id("Btn_1_Id") &"'"
Set Get_Btn_1_Htm = Conn.Execute(Get_Btn_1_Htm_SQL)
Get_Htm_Id_SQL = "Select * From HtmContent Where HtmContent_Id = '"& Get_Btn_1_Htm("HtmContent_Id") &"'"
Set Get_Htm_Id = Conn.Execute(Get_Htm_Id_SQL)
B1 = "<" & "item lable=""" & Get_Btn_1_Text("Btn_1_Text") & "" & """ href=""" & "page_content.asp?ConId=" & Get_Btn_1_Htm("HtmContent_Id") & "&ConType=htm&Fla=" & Get_Htm_Id("Flash_Content") & """/>"
B2 = ""
B3 = ""
Case else
'Hvis Btn_1_Content er asp
Get_Btn_1_Asp_SQL = "Select * From Btn_1_AspContent Where Btn_1_Id = '"& Get_Btn_1_Id("Btn_1_Id") &"'"
Set Get_Btn_1_Asp = Conn.Execute(Get_Btn_1_Asp_SQL)
Get_Asp_Id_SQL = "Select * From AspContent Where AspContent_Id = '"& Get_Btn_1_Htm("AspContent_Id") &"'"
Set Get_Asp_Id = Conn.Execute(Get_Asp_Id_SQL)
B1 = "<" & "item lable=""" & Get_Btn_1_Text("Btn_1_Text") & "" & """ href=""" & "page_content.asp?ConId=" & Get_Btn_1_Asp("AspContent_Id") & "&ConType=asp" & """/>"
B2 = ""
B3 = ""
End select
done = done & B1 & B2 & B3
else
End If
Get_Btn_1_Id.MoveNext
Loop While Not Get_Btn_1_Id.EOF
Helefil = start & done & slut
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.CreateTextFile(Server.Mappath("components/xml/menu/menu.xml"),true)
f.WriteLine("" & Helefil & "")
f.Close
set f=nothing
set fs=nothing
Else
End If
%>
