Asp reads xml files and records

Source: Internet
Author: User

Copy codeThe Code is as follows: if isnumeric (id) = false then exit sub
StrSourceFile = Server. MapPath (dataxml & "/Advertisement/" & id & "/adv. xml ")
Set objXML = Server. CreateObject ("Microsoft. XMLDOM") 'creates an XML Object
ObjXML. load (strSourceFile) 'reads XML files into memory
Set xml1_objxml.doc umentElement. selectSingleNode ("Advertisement") 'select the 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 (10). text
ADclick = xml. childNodes. item (11). text
ADclicks = xml. childNodes. item (12). text
ADtime = xml. childNodes. item (13). text
ADstoptime = xml. childNodes. item (14). text
ADstarttime = xml. childNodes. item (15). text
ADxslei = xml. childNodes. item (16). text
ADcss = xml. childNodes. item (17). text
Picurl = xml. childNodes. item (18). text
ADipkg = xml. childNodes. item (19). text
Xml. childNodes. item (9). text = xml. childNodes. item (9). text + 1 ''display times plus 1
ObjXML. save (strSourceFile)
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.