Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Accesing version controlled files using asp scripts
I have a file named file1.xml also under C:/tarun/file1.xml

file1.xml looks like:-

<?xml version="1.0" encoding="UTF-8" ?>
- <elemNames>
<name>elem1</name>
</elemNames>

Method 1:

ASP Script

set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("C:/tarun/file1.xml")
NumberOfBuilds = xmlDoc.getElementsByTagName("name").length

Response.write(NumberOfBuilds)

The return value from the previous statement is 1 as there is an
element named 'elem1' with tagName 'name' in file1.xml

Method 2:

I version controlled 'file1.xml' using 'Rational Clear Case' on some
server. (Say the name of the server is 'abc.xyz.com'). I have a file
under 'tarun/file1.xml' on it.

I am able to open the file, file.xml in the broswer (IE) using the
following link:
http://abc.xyz.com/tarun/file1.xml

ASP Script:-

set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("http://abc.xyz.com/tarun/file1.xml")
NumberOfBuilds = xmlDoc.getElementsByTagName("name").length

Response.write(NumberOfBuilds)

The retun value from the previous statement is 0 but I expect it to be
1 as there is an element named 'elem1' with tagName 'name' in
file1.xml

Question:
What is the issue with Method 2. Can any one help?


Report this thread to moderator Post Follow-up to this message
Old Post
tarundevnani@gmail.com
08-14-07 08:59 AM


Re: Accesing version controlled files using asp scripts
<tarundevnani@gmail.com> wrote in message
news:1187070385.888880.219380@g12g2000prg.googlegroups.com...
> I have a file named file1.xml also under C:/tarun/file1.xml
>
> file1.xml looks like:-
>
>   <?xml version="1.0" encoding="UTF-8" ?>
> - <elemNames>
>   <name>elem1</name>
>   </elemNames>
>
> Method 1:
>
> ASP Script
>
> set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")
> xmlDoc.async="false"
> xmlDoc.load("C:/tarun/file1.xml")
> NumberOfBuilds = xmlDoc.getElementsByTagName("name").length
>
> Response.write(NumberOfBuilds)
>
> The return value from the previous statement is 1 as there is an
> element named 'elem1' with tagName 'name' in file1.xml
>
> Method 2:
>
> I version controlled 'file1.xml' using 'Rational Clear Case' on some
> server. (Say the name of the server is 'abc.xyz.com'). I have a file
> under 'tarun/file1.xml' on it.
>
> I am able to open the file, file.xml in the broswer (IE) using the
> following link:
> http://abc.xyz.com/tarun/file1.xml
>
> ASP Script:-
>
> set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")
> xmlDoc.async="false"
> xmlDoc.load("http://abc.xyz.com/tarun/file1.xml")
> NumberOfBuilds = xmlDoc.getElementsByTagName("name").length
>
> Response.write(NumberOfBuilds)
>
> The retun value from the previous statement is 0 but I expect it to be
> 1 as there is an element named 'elem1' with tagName 'name' in
> file1.xml
>
> Question:
> What is the issue with Method 2. Can any one help?
>

Try this:-


Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument.3.0")
xmlDoc.setProperty "ServerHTTPRequest", True
xmlDoc.async = False
xmlDoc.load "C:/tarun/file1.xml"

If xmlDoc.parseError.errorCode = 0 Then
Response.Write xmlDoc.getElementsByTagName("name").length
Else
Response.Write xmlDoc.parseError.reason
End If


--
Anthony Jones - MVP ASP/ASP.NET



Report this thread to moderator Post Follow-up to this message
Old Post
Anthony Jones
08-14-07 11:56 PM



Young Natasha is used in all holes! Click the picture to watch for free!
[IMG]http://shocking-p0rn-videos.info/th
umb.jpg[/IMG]








More videos:
Links to here homo
sexual original shirt sold
free gay barebac
k video
Li
nks to homosexual video
free gay military video[/UR
L]
[URL=http://oceanic.wsisiz.edu.pl/~waskowie/forum/viewtopic.php?p=370871]Amateur g
ay videos from Zaza
vin diesel homosexual[/
URL]
[URL=http://me.emu.edu.tr/asme/forum/viewtopic.php?p=11337]Links to homosexual pic

Amateur g
ay videos from Emdegh5
Links to homosexual video[/UR
L]
[URL=http://student.educ.umu.se/~joshio03/sda07v03/phpBB2/viewtopic.php?p=14079]Am
ateur gay videos from Pune

Report this thread to moderator Post Follow-up to this message
Old Post
Cortneys
08-20-07 10:31 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 11:25 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.