Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Dreamweaver (all versions)
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 19th, 2004, 12:57 AM
Registered User
 
Join Date: Aug 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to bommi_k
Default Reading XML in DW MX 2004

We are in the process of writing a extension tool in DW MX 2004.After our investigating we have found that the xml file is not read properly in DW MX 2004.To prove this point we have written a small program (to be run as an extension).and surprisingly it fails when we try to read the xml file.

     Is this a known bug? or am i doing some wrong?

     I have tested this behaviour on Windows 2000 and DW MX 2004.

     Could you please help me find a solution to this?.Thanks in Advance.

Thanks & Regards.,
B.Naveen Kumar




//File to be placed in shared folder and named as test.js
//SHARE-IN-MEMORY=true
function A(){
//var courseListFile= dw.getConfigurationPath()+"/shared/Test/test.xml";


var courseListFile= "file:///D|/test.xml";
alert('courseListFile '+courseListFile);
var DOMObj = dreamweaver.getDocumentDOM(courseListFile);

var Elements = DOMObj.getElementsByTagName("manifest");

for (var i=0;i<Elements.length;i++) {
     FirstElement = Elements[i];
     id = FirstElement.getAttribute('identifier');
     alert("identifier "+id);
     version = FirstElement.getAttribute('version');
     alert("version "+version); //alerts as "undefined"
     var tArray = FirstElement.childNodes; // java-script error as "Object not defined"
     alert('tArray '+tArray.length);
     }
}


//File to be placed in D:\ drive(if you put on c:\ then change in the js file) and named as test.xml

XML File:- (test.xml)

<?xml version="1.0" standalone="no" ?>
<manifest identifier="test" version="1.2" xmlns="http://www.imsproject.org/xsd/imscp_rootv1p1p2"
     xmlns:adlcp="http://www.adlnet.org/xsd/adlcp_rootv1p2">
<lom>
<abcd id="abcdid">
</abcd>
</lom>
</manifest>

//File named as test.html

<html>
<script language="java-script" src="../shared/Test/test.js"></script>
<body>
<form name="frm">
<input type="button" name="Click Me" value="Click Me" onClick="A()">
</form>
</body>
</html>





Reply With Quote
  #2 (permalink)  
Old August 19th, 2004, 01:07 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Yet another cross-post: http://p2p.wrox.com/topic.asp?TOPIC_ID=17817

Snib

<><
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! Pop-Up Menu in DW MX 2004 Maverick Dreamweaver (all versions) 5 November 20th, 2004 12:08 PM
Beginning DW.MX 2004 Global Soccer terry s Dreamweaver (all versions) 6 October 13th, 2004 02:40 PM



All times are GMT -4. The time now is 10:24 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.