ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old September 14th, 2005, 05:48 PM
anandkanatt anandkanatt is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Location: In everybody's mind
Posts: 74 anandkanatt User rank is Private First Class (20 - 50 Reputation Level)anandkanatt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 7 h 48 m 45 sec
Reputation Power: 5
Send a message via Yahoo to anandkanatt
XMLDOM and ASP problem.

I am currently working on an XML project. in the XML file there are multiple nodes of the same ID so i use objDoc.SelectNodes() to select some nodes accordign to a criteria .. and my problem is that when i try to transform this resultant variable with objNode.TransformNode(objXLS) it is showing error that the property is not supported...

what should i do now ... i need to select multiple nodes and transform it with an XML file i have made..

PLEASE HELP ....

Reply With Quote
  #2  
Old September 14th, 2005, 06:31 PM
markoc's Avatar
markoc markoc is offline
Contributing User
ASP Free Regular (2000 - 2499 posts)
 
Join Date: Nov 2003
Location: UK
Posts: 2,268 markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 3 Weeks 2 Days 2 h 27 m 25 sec
Reputation Power: 306
XMLDOM and ASP problem.

please supply some of ur code so we can have a look and hopefully help you.
__________________
Hope this advise helps.

If so please show your appreciation by adding reputation points (click gauge image on top right of this post and score).

Reply With Quote
  #3  
Old September 14th, 2005, 07:08 PM
anandkanatt anandkanatt is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Location: In everybody's mind
Posts: 74 anandkanatt User rank is Private First Class (20 - 50 Reputation Level)anandkanatt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 7 h 48 m 45 sec
Reputation Power: 5
Send a message via Yahoo to anandkanatt
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%Option Explicit%>
<%
Response.Buffer = True
If (Request.Form("mode")="C") Then
'Declare local variables
Dim objXML
Dim objNode
Dim objXSL
Dim objRoot
Dim objRoot2
Dim objNew
Dim objText
Dim html_file
Dim fs_html
'Instantiate the XMLDOM Object that will hold the XML file.
set objXML = Server.CreateObject("Microsoft.XMLDOM")
'Turn off asyncronous file loading.
objXML.async = false
'Instantiate the XMLDOM Object that will hold the XML file.
'Load the XML file.
objXML.load(Server.MapPath("marks.xml"))
'Setting the document root so that that can be dynamically accessed.
'Using the documentElement property of XMLDOM
Set objRoot = objXML.documentElement
'Get the XML record that you wish to view by calling the
'SelectSingleNode method and passing in the e-mail address of the
'contact.
Set objNode = objRoot.selectNodes("FIRSTTERM_row[studentmaster_regno="& trim(Request.Form("adno")) &"][studentname='"& trim(Request.Form("name")) &"']")
'Checking for errors.
If(objNode.length = 0) Then
Response.Write("ERROR : WRONG STUDENT NAME OR ADMISSION NUMBER!")
Response.End()
End If
'Checking over for the Node ...
'Storing values for the node processing...
Dim obj_TEMP
Dim card_data
Dim node_length
'Storing length of node for processing
node_length = objNode.length
Set objTEMP = objNode.selectSingleNode("/FIRSTTERM_row")
'Initialising 
'Instantiate the XMLDOM Object that will hold the XSL file.
set objXSL = Server.CreateObject("Microsoft.XMLDOM")
'Turn off asyncronous file loading.
objXSL.async = false
'Load the XSL file.
objXSL.load(Server.MapPath("marks1.xsl"))
card_data = objTEMP.transformNode(objXSL)
card_data = card_data & "<tr><td bgcolor=""#DBF2FD""><strong>Subject Name</strong></td><td bgcolor=""#DBF2FD""><strong>Max Marks</strong></td><td bgcolor=""#DBF2FD""><strong>Min Marks</strong></td><td bgcolor=""#DBF2FD""><strong>Obtained Marks </strong></td><td bgcolor=""#DBF2FD""><strong>Attendance Status **</strong></td></tr>"
For i = 1 to node_length
Set objTEMP = objNode.selectSingleNode("/FIRSTTERM_row("&(node_length-1)&")")
objXSL.load(Server.MapPath("marks2.xsl"))
card_data = card_data & objTEMP.transformNode(objXSL)
objNode = objNode.nextNode()
Next
Set objTEMP = objNode.selectSingleNode("/FIRSTTERM_row")
objXSL.load(Server.MapPath("marks3.xsl"))
card_data = card_data & objTEMP.transformNode(objXSL)

'Transforming the XML data into XHTML using XSL.
Response.Write(card_data)
'After all the work lets have some peace of mind by stopping the processing
Response.End()
End If
'objNode.transformNode(objXSL)
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>LOGIN</title>
<script language="javascript" type="text/javascript">
<!--
function chkform(){ //Fungtion Ensures Form is not submitted invalid
var errorMsg = ""; 
    if (document.login.name.value == "") errorMsg += "Student Name cannot be left blank!\n";
    if (document.login.adno.value == "") errorMsg += "Student Admission number cannot be left blank!\n";
	if (errorMsg != ""){
	alert("ERRORS!\n\t"+errorMsg);
	return false;}
	return true; }
//-->
</script>
</head>
<body>
<form action="login.asp" method="post" name="login" target="_parent" id="login" onSubmit="return chkform()">
  <table width="75%" align="center" >
    <caption>
    Login
    </caption>
    <tr>
      <td>Student Name </td>
      <td><input name="name" type="text" id="name" maxlength="50">
      </td>
    </tr>
    <tr>
      <td>Admission Number </td>
      <td><input name="adno" type="text" id="adno" maxlength="50"></td>
    </tr>
    <tr>
      <td><input name="mode" type="hidden" id="mode" value="C">
        Note: Student Name is case sensitive </td>
      <td><input type="submit" name="Submit" value="Submit"></td>
    </tr>
  </table>
</form>
</body>
</html>

Reply With Quote
  #4  
Old September 15th, 2005, 02:43 AM
master_key's Avatar
master_key master_key is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Dec 2003
Location: India
Posts: 679 master_key User rank is Second Lieutenant (5000 - 10000 Reputation Level)master_key User rank is Second Lieutenant (5000 - 10000 Reputation Level)master_key User rank is Second Lieutenant (5000 - 10000 Reputation Level)master_key User rank is Second Lieutenant (5000 - 10000 Reputation Level)master_key User rank is Second Lieutenant (5000 - 10000 Reputation Level)master_key User rank is Second Lieutenant (5000 - 10000 Reputation Level)master_key User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 13 h 59 m 33 sec
Reputation Power: 102
Thumbs up Try to use...

Try to use
Code:
strXMLFromXSL = objDOMDocument.transformNode(objXSL.documentElemen  t)


Collect this string in card_data..
Hope this helps..
__________________

ASP.NET Geeks
Visit this group

Reply With Quote
  #5  
Old September 15th, 2005, 05:27 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is online now
Moderator From Beyond
Click here for more information
 
Join Date: Sep 2004
Location: Israel
Posts: 28,987 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 573713 Folding Title: Super Ultimate Folder - Level 2Folding Points: 573713 Folding Title: Super Ultimate Folder - Level 2Folding Points: 573713 Folding Title: Super Ultimate Folder - Level 2Folding Points: 573713 Folding Title: Super Ultimate Folder - Level 2Folding Points: 573713 Folding Title: Super Ultimate Folder - Level 2Folding Points: 573713 Folding Title: Super Ultimate Folder - Level 2Folding Points: 573713 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 18 h 21 m 20 sec
Reputation Power: 2424
in theory, XML can't have more than one item with the same ID. it's illegal, and
not considered XML... so you might consider using FSO to read the file, being text file
only.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > XMLDOM and ASP problem.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek