隨筆 - 8  文章 - 55  trackbacks - 0
          <2006年5月>
          30123456
          78910111213
          14151617181920
          21222324252627
          28293031123
          45678910

          常用鏈接

          留言簿(6)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          朋友的Blog

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          vbs類生成xml文件
          [ 作者:??加入時(shí)間:2006-04-03 15:13:42??來自: ]
          有兩文件:
          obj
          XML . asp :測試文件
          cls
          XML . asp :vbs類文件
          代碼:
          obj
          XML . asp

          <%@ Language=VBScript %>
          <% Option Explicit %>
          <!--#INCLUDE FILE="cls
          XML . asp "-->
          <%
          Dim obj
          XML , strPath, str
          Set obj
          XML = New cls XML

          strPath = Server.MapPath(".") & "/New.xml"

          obj XML .createFile strPath, "Root"
          'Or If using an existing
          XML file:
          'obj
          XML .File = "C:/File.xml"

          obj XML .createRootChild "Images"

          'Here only one attribute is added to the Images/Image Node
          obj
          XML .createChildNodeWAttr "Images", "Image", "id", "1"
          obj
          XML .updateField "Images//Image[@id=1]", "super.gif"
          obj
          XML .createRootNodeWAttr "Jobs", Array("Size", "Length", "Width"), _
          Array(24, 31, 30)
          obj
          XML .createRootNodeWAttr "Jobs", Array("Size", "Length", "Width"), _
          Array(24, 30, 29)
          obj
          XML .createRootNodeWAttr "Jobs", Array("Size", "Length", "Width"), _
          Array(24, 31, 85)

          'Notice that all three job nodes have size 24, all of those
          'nodes will be updated
          obj
          XML .updateField "Jobs[@Size=24]", "24's"

          'Notice that only two nodes have the specified XPath, hence
          'only two new child nodes will be added
          obj
          XML .createChildNodeWAttr "Jobs[@Size=24 and @Length=31]", "Specs", _
          Array("Wood", "Metal", "Color"), _
          Array("Cedar", "Aluminum", "Green")

          'It is always important to iterate through all of the nodes
          'returned by this XPath query.
          For Each str In obj
          XML .getField("Jobs[@Size=24]")
          Response.Write(str & "<br>")
          Next
          Set obj
          XML = Nothing

          Response.Redirect "New.xml"
          %>

          cls XML . asp :

          <%
          Class cls
          XML
          'strFile must be full path to document, ie C:/ XML / XML File. XML
          'objDoc is the XML Object
          Private strFile, objDoc

          '*********************************************************************
          ' Initialization/Termination
          '*********************************************************************

          'Initialize Class Members
          Private Sub Class_Initialize()
          strFile = ""
          End Sub

          'Terminate and unload all created objects
          Private Sub Class_Terminate()
          Set objDoc = Nothing
          End Sub

          '*********************************************************************
          ' Properties
          '*********************************************************************

          'Set XML File and objDoc
          Public Property Let File(str)
          Set objDoc = Server.CreateObject("Microsoft.
          XML DOM")
          objDoc.async = False
          strFile = str
          objDoc.Load strFile
          End Property

          'Get XML File
          Public Property Get File()
          File = strFile
          End Property

          '*********************************************************************
          ' Functions
          '*********************************************************************

          'Create Blank XML File, set current obj File to newly created file
          Public Function createFile(strPath, strRoot)
          Dim objFSO, objTextFile
          Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
          Set objTextFile = objFSO.CreateTextFile(strPath, True)
          objTextFile.WriteLine("<?xml version=""1.0""?>")
          objTextFile.WriteLine("<" & strRoot & "/>")
          objTextFile.Close
          Me.File = strPath
          Set objTextFile = Nothing
          Set objFSO = Nothing
          End Function

          'Get XML Field(s) based on XPath input from root node
          Public Function getField(strXPath)
          Dim objNodeList, arrResponse(), i
          Set objNodeList = objDoc.documentElement.selectNodes(strXPath)
          ReDim arrResponse(objNodeList.length)
          For i = 0 To objNodeList.length - 1
          arrResponse(i) = objNodeList.item(i).Text
          Next
          getField = arrResponse
          End Function

          'Update existing node(s) based on XPath specs
          Public Function updateField(strXPath, strData)
          Dim objField
          For Each objField In objDoc.documentElement.selectNodes(strXPath)
          objField.Text = strData
          Next
          objDoc.Save strFile
          Set objField = Nothing
          updateField = True
          End Function

          'Create node directly under root
          Public Function createRootChild(strNode)
          Dim objChild
          Set objChild = objDoc.createNode(1, strNode, "")
          objDoc.documentElement.appendChild(objChild)
          objDoc.Save strFile
          Set objChild = Nothing
          End Function

          'Create a child node under root node with attributes
          Public Function createRootNodeWAttr(strNode, attr, val)
          Dim objChild, objAttr
          Set objChild = objDoc.createNode(1, strNode, "")
          If IsArray(attr) And IsArray(val) Then
          If UBound(attr)-LBound(attr) <> UBound(val)-LBound(val) Then
          Exit Function
          Else
          Dim i
          For i = LBound(attr) To UBound(attr)
          Set objAttr = objDoc.createAttribute(attr(i))
          objChild.setAttribute attr(i), val(i)
          Next
          End If
          Else
          Set objAttr = objDoc.createAttribute(attr)
          objChild.setAttribute attr, val
          End If
          objDoc.documentElement.appendChild(objChild)
          objDoc.Save strFile
          Set objChild = Nothing
          End Function

          'Create a child node under the specified XPath Node
          Public Function createChildNode(strXPath, strNode)
          Dim objParent, objChild
          For Each objParent In objDoc.documentElement.selectNodes(strXPath)
          Set objChild = objDoc.createNode(1, strNode, "")
          objParent.appendChild(objChild)
          Next
          objDoc.Save strFile
          Set objParent = Nothing
          Set objChild = Nothing
          End Function

          'Create a child node(s) under the specified XPath Node with attributes
          Public Function createChildNodeWAttr(strXPath, strNode, attr, val)
          Dim objParent, objChild, objAttr
          For Each objParent In objDoc.documentElement.selectNodes(strXPath)
          Set objChild = objDoc.createNode(1, strNode, "")
          If IsArray(attr) And IsArray(val) Then
          If UBound(attr)-LBound(attr) <> UBound(val)-LBound(val) Then
          Exit Function
          Else
          Dim i
          For i = LBound(attr) To UBound(attr)
          Set objAttr = objDoc.createAttribute(attr(i))
          objChild.SetAttribute attr(i), val(i)
          Next
          End If
          Else
          Set objAttr = objDoc.createAttribute(attr)
          objChild.setAttribute attr, val
          End If
          objParent.appendChild(objChild)
          Next
          objDoc.Save strFile
          Set objParent = Nothing
          Set objChild = Nothing
          End Function

          'Delete the node specified by the XPath
          Public Function deleteNode(strXPath)
          Dim objOld
          For Each objOld In objDoc.documentElement.selectNodes(strXPath)
          objDoc.documentElement.removeChild objOld
          Next
          objDoc.Save strFile
          Set objOld = Nothing
          End Function
          End Class
          %>

          posted @ 2006-06-06 13:04 blog搬家了--[www.ialway.com/blog] 閱讀(427) | 評(píng)論 (0)編輯 收藏

          www.nike.com

          www.m5.icoke.com

          http://www.hcgjhotel.com/

          http://www.peugeot.com.cn/web/307/

          http://www.kingnare.com/

          http://www.greenovia.net/

          http://www.blueidea.com/bbs/newsdetail.asp?page=4&id=1935698&Daysprune=&lp=1

          http://www.5dmax.com/

          http://www.skii.com.cn/pitera/index.html

          http://www.daphne.com.cn/d28/

          http://www.wangbao.com.cn/main.html

          http://www.mystvgame.com/us/

          http://land.anycall.com/event/anyclub2/event_main.jsp

          http://www.gglc.com.cn/main.htm

          http://www.boyaguoji.com/index1.htm

          www.superaction.co.kr

          posted @ 2006-06-03 21:34 blog搬家了--[www.ialway.com/blog] 閱讀(411) | 評(píng)論 (0)編輯 收藏
          QQ罵人寶典7
          作者:未知 來源:99軟件站 加入時(shí)間:2004-8-28 飛牌精品軟件
           
          男人的四大理想:天上紛紛掉鈔票,天下美男都死掉,美女腦子都?jí)牡?哭著喊著讓我泡.

          丑女一回頭,嚇?biāo)酪活^牛;丑女二回頭,黃河瀑布水倒流;丑女三回頭,泰森改打乒乓球!

          男人四怕:怕小姐有病,怕情人懷孕,怕群眾寫信,怕老婆自盡。你怕啥?

          這段日子以來,我一直想對(duì)你說三個(gè)字,但又怕說了連普通朋友也做不成,可我控制不住,還是想說:借點(diǎn)錢!

          腦筋急轉(zhuǎn)彎:一只豬過馬路被車撞死了,為什么?告訴你吧,是豬不會(huì)急轉(zhuǎn)彎。

          老婆無味,情人太累,小姐太貴,沒事開個(gè)同學(xué)會(huì),拆散一對(duì)是一對(duì)

          克林頓睡覺是國睡 乞丐睡覺是地稅 和老婆睡覺是依法納稅 和情人睡覺是偷稅漏稅 和小姨子睡覺是增值稅

          讀出下面的字,你將獲得月薪2000000的工作,試題如下:簟璁醭歙艽绱癀穡魍旃傯彘硪钚鰣硐蓰。

          警告。你的手機(jī)由于黑客侵入信號(hào)系統(tǒng),電池即將被引爆。請立即將手機(jī)電池取下扔出五米距離。切切。

          兄弟!請不要在每次放屁后低頭猛吸就以為能把屁味吸光!:p

          啊!你的皮膚如此富有光澤,你散發(fā)的香味如此難以抗拒,讓我狠狠咬你一口吧,我親愛的--紅燒肉。

          人家撈,你不撈,老婆說你是草包;人家賭,你不賭,背后說你二百五;人家嫖,你不嫖,大伙一起造你謠

          人生四大悲:久旱逢甘霖-不停;他鄉(xiāng)遇故知-借錢;洞房花燭夜-不舉;金榜題名時(shí)-別人

          豬的四大愿望:四周柵欄都倒掉,天上紛紛掉飼料。天下屠夫都死掉,世界人民信佛教。

          天大地大不如老婆大;爹親娘親不如小姐親;千好萬好不如二奶好!

          只愛一個(gè)有點(diǎn)傻,愛上兩個(gè)最起碼,三個(gè)五個(gè)剛合適,十個(gè)八個(gè)才瀟灑。

          山外青山樓外樓,你不愛我我不愁。世上美女到處有,她會(huì)比你更溫柔!

          投保:男朋友是準(zhǔn)客戶,老公是客戶,結(jié)婚是簽單,離婚是退保,再婚是續(xù)保,找老二是加保  

          這是有“屎”以來最有“糞”量的祝福

          有三個(gè)字一直藏在我的心底不敢對(duì)你說。現(xiàn)在我終于鼓足了勇氣:“去死吧!”  

          那天我看見你拿到狂砍一只豬,豬跑到一個(gè)死胡同,只聽見豬大叫:“本是同根生,相煎何太急!”

          你如果收到本信息,證明你手機(jī)以感染病毒,請馬上取出手機(jī)卡,用汽油刷洗。

          網(wǎng)上無計(jì)可消愁,聊天解煩憂,忽見美眉在招手,頓首頓首,關(guān)掉其他窗口,聊到最后,是一北方老叟,作嘔作嘔!

          不許動(dòng)!搶劫!全部舉起手來!男的站左邊,女的站右邊,變態(tài)的站中間,哎!說的就是你,還裝著看手機(jī)!

          美眉美眉我愛你!先用話語感動(dòng)你,再用行動(dòng)打動(dòng)你,買個(gè)戒指送給你,再用勞斯萊斯去娶你!(你愿意嗎?)

          嫖客:萬水千山總是情,少給十塊行不行;妓女:人間哪有真情在,多賺十塊是十塊。

          有一個(gè)女生去牧場見習(xí)擠牛奶,可別人都擠了一桶了,她還只擠了一點(diǎn),正著急,突然老牛說了:小姐,你擠錯(cuò)地方了!

          強(qiáng)匪發(fā)現(xiàn)保險(xiǎn)柜里頭全都是果凍,他一氣之下,把所有果凍都吃掉。隔天報(bào)紙的頭條是這么寫的 ※瘋狂歹徒,精子銀行被盜※

          獵人發(fā)現(xiàn)一只豬,舉起獵槍打死了豬,獵人走近豬,豬卻起來了,知道為什么?猜不到?—豬也正納悶?zāi)亍?br />
          男人最渴望的一句話:“我要”;男人最恐懼的一句話:“我還要嘛”

          請走到最近的電線桿前面,對(duì)著上面的野廣告大聲說“我的病有救了”

          你比鏡子還能反映我的缺點(diǎn),你比莊子還博學(xué)多才,你比孫子還有謀略。所以我們都親切的叫你:“鏡莊孫子”。

          網(wǎng)上自古少嬌娘,歪瓜裂棗排成行,偶爾幾聲鴛鴦叫,也是淫女配色狼. 
          posted @ 2006-05-31 12:46 blog搬家了--[www.ialway.com/blog] 閱讀(855) | 評(píng)論 (0)編輯 收藏
          Adobe Apollo計(jì)劃:讓Flash擺脫瀏覽器

          Adobe平臺(tái)業(yè)務(wù)單元的首席軟件架構(gòu)師兼高級(jí)副主席Kevin Lynch透露,他們正開發(fā)一個(gè)代號(hào)為Apollo的項(xiàng)目,它將使得針對(duì)Adobe的Flash Presentation軟件開發(fā)的應(yīng)用程序不用網(wǎng)頁瀏覽器就能運(yùn)行。

            Lynch表示,Apollo預(yù)計(jì)明年初就會(huì)免費(fèi)提供下載,它開發(fā)的目的是為了克服目前網(wǎng)頁應(yīng)用的限制。目前,F(xiàn)lash程序是運(yùn)行在網(wǎng)頁瀏覽器當(dāng)中的。他還表示,Apollo是基于客戶端的軟件,它可以獨(dú)立于網(wǎng)頁瀏覽器之外運(yùn)行Flash程序而不管是在線還是離線。

            Apollo是設(shè)計(jì)來為開發(fā)人員提供一種創(chuàng)建可渲染Flash動(dòng)畫、HTML和Acrobat(PDF)文件應(yīng)用程序的途徑。

            Lynch表示,如email這些原生的網(wǎng)絡(luò)應(yīng)用程序,雖然它們可以運(yùn)行在不同的操作系統(tǒng)之上,但是當(dāng)用戶斷開網(wǎng)絡(luò)連接時(shí)就無能為力了;而Apollo正是可以彌補(bǔ)這一缺陷。

            Apollo程序在用戶下線時(shí)還會(huì)繼續(xù)運(yùn)行,并且當(dāng)用戶重新上線時(shí)就會(huì)自動(dòng)的更新數(shù)據(jù)。例如,某人在離線的狀態(tài)下通過手持設(shè)備或筆記本來預(yù)訂機(jī)票;當(dāng)他重新鏈接到網(wǎng)絡(luò)時(shí),這個(gè)軟件就會(huì)自動(dòng)的完成剩下的業(yè)務(wù)。

            除此之外,Apollo應(yīng)用程序和其它桌面應(yīng)用程序沒什么區(qū)別:它們都擁有獨(dú)立的圖標(biāo)來運(yùn)行程序,并且可以在系統(tǒng)輔助工具中看到它們。

            一個(gè)早期版本的Apollo軟件預(yù)期會(huì)在今年年底推出,到時(shí)用戶可以從Adobe Labs官方網(wǎng)站下載。程序員可以利用Adobe現(xiàn)有的工具產(chǎn)品線來編寫運(yùn)行在Apollo中的應(yīng)用程序。

          posted @ 2006-05-15 11:27 blog搬家了--[www.ialway.com/blog] 閱讀(417) | 評(píng)論 (0)編輯 收藏
          主站蜘蛛池模板: 武邑县| 榕江县| 共和县| 五家渠市| 朝阳市| 郓城县| 紫金县| 钟山县| 贡觉县| 梁河县| 横峰县| 正阳县| 故城县| 城固县| 襄城县| 家居| 正宁县| 密山市| 且末县| 太湖县| 香港 | 三原县| 股票| 濮阳县| 南和县| 邹平县| 涞水县| 顺平县| 遂平县| 荔浦县| 南投县| 鹤岗市| 商丘市| 桂林市| 佛坪县| 黑水县| 上思县| 南康市| 岱山县| 北川| 贞丰县|