ASP Read XML file _ Application Tips

Source: Internet
Author: User
Copy Code code as follows:
strSourceFile = Server.MapPath (dataxml& "/advertisement/" &id& "/adv.xml")
Set objxml =server.createobject ("Microsoft.XMLDOM") ' creates an XML pair like
Objxml.load (strsourcefile) ' reads the XML file into memory
Set Xml=objxml.documentelement.selectsinglenode ("advertisement") ' Select node advertisement
Adid=xml.childnodes.item (0). Text
Adname=xml.childnodes.item (1). Text
Adintro=xml.childnodes.item (2). Text
Adact=xml.childnodes.item (3). Text
Adclass=xml.childnodes.item (4). Text
Pids=xml.childnodes.item (5). Text
Picid=xml.childnodes.item (6). Text
Adurl=xml.childnodes.item (7). Text
Adwindow=xml.childnodes.item (8). Text
Adshow=xml.childnodes.item (9). Text
Adshows=xml.childnodes.item. Text
Adclick=xml.childnodes.item (one). Text
Adclicks=xml.childnodes.item (in). Text
Adtime=xml.childnodes.item. Text
Adstoptime=xml.childnodes.item. Text
Adstarttime=xml.childnodes.item. Text
Adxslei=xml.childnodes.item. Text
Adcss=xml.childnodes.item. Text
Picurl=xml.childnodes.item. Text
Adipkg=xml.childnodes.item. Text
If Advertvirtualvalue>=1 Then
Xml.childNodes.item (3). text=2
Objxml.save (strSourceFile)
End If
End If
Set xml=nothing
Set Objxml =nothing
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.