[問題] xmlns:aaa="Main"

看板Flash作者 (紅虫)時間14年前 (2010/08/23 11:33), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/4 (看更多)
小弟在試 Essential Actionscript 3.0 p.403的範例: var htmlNS:Namespace = new Namespace("html", "http://www.w3.org/1999/xhtml"); var shopNS:Namespace = new Namespace("shop", "http://example.com/furniture"); default xml namespace = htmlNS; var catalog:XML = <html/>; catalog.addNamespace(shopNS); catalog.head.title = "Catalog"; catalog.body.shopNS::table = ""; catalog.body.shopNS::table.@shopNS::id = "4875"; catalog.body.shopNS::table.table = ""; catalog.body.shopNS::table.table.@border = "1"; catalog.body.shopNS::table.table.tr.td = "Item"; catalog.body.shopNS::table.table.tr.td[1] = "Price"; trace(catalog.toXMLString()); result: <html xmlns:shop="http://example.com/furniture" xmlns="" rel="nofollow">http://www.w3.org/1999/xhtml"> <head> <title>Catalog</title> </head> <body> <shop:table shop:id="4875"> <table border="1"> <tr> <td>Item</td> <aaa:td xmlns:aaa="Main">Price</aaa:td> </tr> </table> </shop:table> </body> </html> 請問版上大大為什麼 上面第二個td 會跑出aaa這個namespace呢? 謝謝.. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 60.251.117.162

08/25 17:44, , 1F
你的 code 我執行,不會有你說的 aaa
08/25 17:44, 1F

08/26 04:16, , 2F
根本看不出aaa從哪冒出來的= =
08/26 04:16, 2F
文章代碼(AID): #1CSUmctF (Flash)
文章代碼(AID): #1CSUmctF (Flash)