Getting xml attributes in ASP

Results 1 to 2 of 2

Thread: Getting xml attributes in ASP

  1. #1
    Join Date
    Dec 1969

    Default Getting xml attributes in ASP

    I would like to ask for comments on my strategy to convert my app to using XML as the defacto data transport method.<BR><BR>I am building a flash based (Macromedia Flash) UI that users will act as the admin for the data layer. The Flash application will send requests to a controller file (controller.asp) in XML. <BR><BR>In most cases, the xml message will always be very simple in the form of:<BR><BR>&#060;x8_request action="someaction" userid="xxx"&#062;&#060;/x8_request&#062;<BR><BR>My question is, how do I code the "controller.asp" file to parse the xml string and get the value of the "action" and "userid" attributes of the x8_request item?

  2. #2
    Join Date
    Dec 1969

    Default RE: Getting xml attributes in ASP

    Set xmlNode = xmlDocument.selectSingleNode("/x8_request")<BR>If xmlNode Is Nothing Then<BR> Response.Write "x8_request node not found. process stopped."<BR> Response.End<BR>End If<BR><BR>Set xmlAttrib = xmlNode.getNamedItem("action")<BR>If xmlAttrib Is Nothing Then<BR> Response.Write "action attribute not found on x8_request node. process stopped."<BR> Response.End<BR>End If<BR><BR>Man, I must be friendly today. For any more information (unless AK is fixing bugs in this), just search Google for info about the MS XML Parser.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts