Embedding XML file in an ASP file

Results 1 to 3 of 3

Thread: Embedding XML file in an ASP file

  1. #1
    Join Date
    Dec 1969

    Default Embedding XML file in an ASP file

    hi,<BR> I tried to embed an XML file in a server side ASP FILE. i&#039m using PWS. When it is embedded with a client side html file, it works. But when it is embedded within an ASP file, it gives some error like "Object Required".<BR><BR>sanjay

  2. #2
    Guhan Guest

    Default RE: Embedding XML file in an ASP file

    What was ur code in the server page<BR><BR>guhan

  3. #3
    sanjay/prasanna Guest

    Default RE: Embedding XML file in an ASP file

    hi,<BR> This is the code u had asked for. i would like this code to be run in a server side asp file.<BR><BR>&#060;script language="vbs"&#062;<BR>sub f1(p)<BR>msgbox(p)<BR>&#039alert(p)<BR>set xmlDoc=CreateObject("Microsoft.XMLDOM")<BR>xmlDoc. async="false"<BR>xmlDoc.load("TrainMovements.xml") <BR>&#039set y=xmlDoc.documentElement.childNodes.item(4).childN odes.item(0).childNodes.item(1)<BR>&#039document.w rite(y.nodeName)<BR>document.write("<BR>")<BR>&#03 9document.write(y.nodeValue)<BR>document.write("<B R>")<BR>&#060;!-- to select a single node details--&#062;<BR>&#039Set z = xmlDoc.documentElement.selectSingleNode("Trains/Train")<BR>Set z1= xmlDoc.documentElement.selectSingleNode("Trains/Train[TrainNo$eq$"&p&"]")<BR>&#039document.write(z.text)<BR>document.writ e("<BR>")<BR>zza=z1.text<BR>myarray=split(zza," ")<BR>msgbox(ubound(myarray))<BR>for i=0 to ubound(myarray)<BR>document.write(myarray(i)&"<BR> ")<BR>next<BR><BR>document.write("<BR>")<BR>&#039d ocument.write(z1.text)<BR>document.write("<BR>")<B R>document.write(zza)<BR>document.write("<BR>")<BR >&#039document.write(y.text)<BR>&#039document.writ e(y.nodeTypeString)<BR>end sub<BR>&#060;/script&#062;<BR><BR>sanjay/prasanna<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