CoderZone.org

Category: >> ASP/VB Code >> Using ASP to Insert into XML Bookmark and Share

<< lastnext >>

Snippet Name: Using ASP to Insert into XML

Description: An example script showing how to insert records into XML.

Also see:
» Easy way to break apart an email a...
» Check for a Valid Email Address (V...
» Sending Email With Perl
» Check For A Valid Email Address
» Another Good Email Validator
» Send iCal Email Meeting Requests u...
» Check email address
» Send email with attachments from P...
» Is email deliverable?
» Email attachments with PHP mail()
» Email w/ attachments class
» Automatically process email
» Live validation of email address
» Send email from Oracle
» Fake email addresses
» Validate email address #3
» Validate email address #2
» Validate email address #1

Comment: (none)

Author:
Language: ASP
Highlight Mode: VB
Last Modified: December 03rd, 2010

<%@ LANGUAGE="VBSCRIPT" %>
 
<%
    response.ContentType = "text/xml"
 
    ' Create an ASP XML parser object
    set xml0 = Server.CreateObject("Test.Xml")
 
    ' Returns the XML page as a Variant
    set xml = xml0.HttpGet("http://www.xml-parser.com/companies.xml")
 
    ' Insert a new company
    set companyNode = xml.NewChild("company", "")
    set nameNode = companyNode.NewChild("name", "Some Company, Inc.")
 
    ' Add an attribute to this node.
    nameNode.AddAttribute "Symbol", "XYZ"
 
    companyNode.NewChild2 "address", "1234 Test St."
    companyNode.NewChild2 "city", "Seattle"
    companyNode.NewChild2 "state", "WA"
    companyNode.NewChild2 "zip", "98004"
    companyNode.NewChild2 "website", "http:www.somecompany.com"
    companyNode.NewChild2 "phone", "425-555-1212"
 
    response.write xml.GetXml()
%>
 
 
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© coderzone.org | users online: 4