By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,131 Members | 1,437 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,131 IT Pros & Developers. It's quick & easy.

saving xml in javascript

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles

Oct 27 '06 #1
Share this Question
Share on Google+
90 Replies


P: n/a
ch**********@gmail.com wrote:

I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.save("Guestbook.xml");
Whether calling the save method successfully is allowed depends on the
host your script is used in. IE with normal security settings does not
allow that, I am not even sure lowering security settings will allow it.
It is however allowed to call save in a Windows Script Host script, in
an ASP page, in a HTML application (HTA), to name the most common hosts.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Oct 27 '06 #2

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Desidero appena dire che e un luogo ben cotto http://www.usate348.org/progetti

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Feb 21 '07 #3

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
mmm.. nice design, I must say.. http://www.bovso.org/amici

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Feb 23 '07 #4

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Guter Aufstellungsort, ja! http://www.flryanair.org/mondo

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Feb 25 '07 #5

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Luogo grande! Grande giusto! I miei riguardi migliori al proprietario:) http://www.canaxe.org/antivirus

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Feb 28 '07 #6

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Luogo molto buon:) Buona fortuna! http://www.canaxe.org/racconti

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Feb 28 '07 #7

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Very valuable information you have here. Thanks.. http://www.canaxe.org/entertainment

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Feb 28 '07 #8

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Desidero appena dire che e un luogo ben cotto http://www.canaxe.org/trasporti

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 1 '07 #9

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Stupore! ho una sensibilit molto buona circa il vostro luogo!!!! http://www.canaxe.org/veneto

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 1 '07 #10

P: n/a
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?
It is not possible, by JavaScript policy, to save a document in the
client side.

You might ask for that using a server side script writen in php for
example...
--
Une Bévue
Mar 1 '07 #11

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
I'll be BACK! :) ;) http://www.canaxe.org/videocamere

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 1 '07 #12

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
E evidente che il luogo e stato fatto dalla persona che realmente conosce il mestiere! http://www.canaxe.org/vetro

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 1 '07 #13

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Very valuable information you have here. Thanks.. http://www.canaxe.org/traduzioni

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 1 '07 #14

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Luogo molto buon:) Buona fortuna! http://www.canaxe.org/sexi

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 1 '07 #15

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Grande sito!! http://www.avwzioni.org/capelli

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 1 '07 #16

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Great site! Good luck to it's owner! http://www.avwzioni.org/nudi

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 2 '07 #17

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
luogo grande:) nessun osservazioni! http://www.avwzioni.org/molise

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 2 '07 #18

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Grand emplacement! La conception est merveilleuse! http://www.avwzioni.org/supereva

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 2 '07 #19

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Grande! Il luogo cose buon, tutto e abbastanza ragionevole e piacevole.. http://www.avwzioni.org/economici

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 2 '07 #20

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
WOW!! I like it! http://www.avwzioni.org/figa

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 2 '07 #21

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Interesting contents i consider.. http://www.bambini.batcave.net

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 2 '07 #22

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
http://www.bloggingmylife.com/?u=sessois

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 2 '07 #23

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
http://itsesso.beeplog.com

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 2 '07 #24

P: n/a
On Mar 1, 12:07 am, unbewusst.s...@google.com.invalid (Une Bévue)
wrote:
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

It is not possible, by JavaScript policy, to save a document in the
client side.

You might ask for that using a server side script writen in php for
example...
--
Une Bévue
>>>>>>>>>>>>>>>
It is not possible, by JavaScript policy, to save a document in the
client side.
>>>>>>>>>>>>>>>
This is only true if your web page is being served by a web server.
If the web page is a local file on a hard drive that you have rights
to, then the save method works. I use it all the time to write
browser-based applications that dont require a web server to exist on
the users machine. They just click a local html file fill out the
form and save away.
Mar 2 '07 #25

P: n/a
On Mar 2, 5:16 pm, "RickH" <passp...@windcrestsoftware.comwrote:
On Mar 1, 12:07 am, unbewusst.s...@google.com.invalid (Une Bévue)
wrote:


Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?
It is not possible, by JavaScript policy, to save a document in the
client side.
You might ask for that using a server side script writen in php for
example...
--
Une Bévue
It is not possible, by JavaScript policy, to save a document in the
client side.

This is only true if your web page is being served by a web server.
If the web page is a local file on a hard drive that you have rights
to, then the save method works. I use it all the time to write
browser-based applications that dont require a web server to exist on
the users machine. They just click a local html file fill out the
form and save away.- Hide quoted text -

- Show quoted text -

Also, for IE I would also suggest you instantiate the DOM in this
manner: as the class name you are using in the example will give you a
very old version 3 of the DOM, now that the DOM is installed side-by-
side on windows new releases, there is no longer a single clsid for
the DOM. The function below will return the most recent version that
the machine has installed. Also in your type of app make sure the
async property is set to false.

function getXMLDom() {
// Please use the highest version of XML that is currently installed
on your machine
var locXML
try {
locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.6.0" )
}
catch(e) {
try {
locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.5.0" )
}
catch(e) {
try {
locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.4.0" )
}
catch(e) {
try {
locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0" )
}
catch(e) {
try {
locXML = new ActiveXObject("MSXML2.DOMDocument.6.0")
}
catch(e) {
try {
locXML = new ActiveXObject("MSXML2.DOMDocument.5.0")
}
catch(e) {
try {
locXML = new ActiveXObject("MSXML2.DOMDocument.4.0")
}
catch(e) {
try {
locXML = new ActiveXObject("MSXML2.DOMDocument.3.0")
}
catch(e) {
}
}
}
}
}
}
}
}
locXML.async = false
locXML.validateOnParse = true;
locXML.resolveExternals = true;
locXML.setProperty("SelectionLanguage", "XPath");
if (typeof(locXML) == 'undefined') {
alert('Error: you must have the XML DOM installed')
return null
} else {
return locXML
}
}

Mar 2 '07 #26

P: n/a
On Mar 2, 5:23 pm, "RickH" <passp...@windcrestsoftware.comwrote:
On Mar 2, 5:16 pm, "RickH" <passp...@windcrestsoftware.comwrote:


On Mar 1, 12:07 am, unbewusst.s...@google.com.invalid (Une Bévue)
wrote:
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing.Any
thoughts or ideas on what I'm doing wrong?
It is not possible, by JavaScript policy, to save a document in the
client side.
You might ask for that using a server side script writen in php for
example...
--
Une Bévue
It is not possible, by JavaScript policy, to save a document in the
client side.
This is only true if your web page is being served by a web server.
If the web page is a local file on a hard drive that you have rights
to, then the save method works. I use it all the time to write
browser-based applications that dont require a web server to exist on
the users machine. They just click a local html file fill out the
form and save away.- Hide quoted text -
- Show quoted text -

Also, for IE I would also suggest you instantiate the DOM in this
manner: as the class name you are using in the example will give you a
very old version 3 of the DOM, now that the DOM is installed side-by-
side on windows new releases, there is no longer a single clsid for
the DOM. The function below will return the most recent version that
the machine has installed. Also in your type of app make sure the
async property is set to false.

function getXMLDom() {
// Please use the highest version of XML that is currently installed
on your machine
var locXML
try {
locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.6.0" )
}
catch(e) {
try {
locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.5.0" )
}
catch(e) {
try {
locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.4.0" )
}
catch(e) {
try {
locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0" )
}
catch(e) {
try {
locXML = new ActiveXObject("MSXML2.DOMDocument.6.0")
}
catch(e) {
try {
locXML = new ActiveXObject("MSXML2.DOMDocument.5.0")
}
catch(e) {
try {
locXML = new ActiveXObject("MSXML2.DOMDocument.4.0")
}
catch(e) {
try {
locXML = new ActiveXObject("MSXML2.DOMDocument.3.0")
}
catch(e) {
}
}
}
}
}
}
}
}
locXML.async = false
locXML.validateOnParse = true;
locXML.resolveExternals = true;
locXML.setProperty("SelectionLanguage", "XPath");
if (typeof(locXML) == 'undefined') {
alert('Error: you must have the XML DOM installed')
return null
} else {
return locXML
}

}- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -
Oops, I'm finding my own bugs, the function previously posted should
end like this:

if (typeof(locXML) == 'undefined') {
alert('Error: you must have the XML DOM installed')
return null
} else {
locXML.async = false
locXML.validateOnParse = true;
locXML.resolveExternals = true;
locXML.setProperty("SelectionLanguage", "XPath");
return locXML
}

Mar 2 '07 #27

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Ich besichtige deinen Aufstellungsort wieder bald fur sicheres! http://www.2ire17.org/pokemon-porn

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 3 '07 #28

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
I'll be BACK! :) ;) http://www.2ire17.org/cristiana

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 3 '07 #29

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
luogo interessante, soddisfare interessante, buon! http://www.2ire17.org/aria

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 3 '07 #30

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Stupore! ho una sensibilit molto buona circa il vostro luogo!!!! http://www.2ire17.org/universita

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 3 '07 #31

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Dein Aufstellungsort verdient nur gute Woerter. Danke. http://www.2ire17.org/sicilia

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 3 '07 #32

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Du musst ein Fachmann sein - wirklich guter Aufstellungsort, den du hast! http://www.ojgetti.org/suonerie

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 3 '07 #33

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
9 su 10! Ottenerlo! Siete buoni! http://www.ojgetti.org/ciao-bella

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 4 '07 #34

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
9 su 10! Ottenerlo! Siete buoni! http://www.ojgetti.org/parma

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 4 '07 #35

P: n/a
RickH <pa******@windcrestsoftware.comwrote:
>
>>>>>>>>>>>>>>
It is not possible, by JavaScript policy, to save a document in the
client side.
>>>>>>>>>>>>>>

This is only true if your web page is being served by a web server.
If the web page is a local file on a hard drive that you have rights
to, then the save method works. I use it all the time to write
browser-based applications that dont require a web server to exist on
the users machine. They just click a local html file fill out the
form and save away.
right !

are you able to do that saving of a file with JavaSCript , which code ?

i do have an application for that :

the user select an area on the browser window and the javascript save
that part locally, usefull, for example when u read an article online
and want to avoid saving pub.
--
Une Bévue
Mar 4 '07 #36

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Great site! Good luck to it's owner! http://www.ojgetti.org/nude

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 4 '07 #37

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Nice site you have! http://www.ojgetti.org/wallpaper

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 4 '07 #38

P: n/a
On Mar 3, 11:30 pm, unbewusst.s...@google.com.invalid (Une Bévue)
wrote:
RickH <passp...@windcrestsoftware.comwrote:
It is not possible, by JavaScript policy, to save a document in the
client side.
This is only true if your web page is being served by a web server.
If the web page is a local file on a hard drive that you have rights
to, then the save method works. I use it all the time to write
browser-based applications that dont require a web server to exist on
the users machine. They just click a local html file fill out the
form and save away.

right !

are you able to do that saving of a file with JavaSCript , which code ?

i do have an application for that :

the user select an area on the browser window and the javascript save
that part locally, usefull, for example when u read an article online
and want to avoid saving pub.
--
Une Bévue

Actually, I'm wrong, you're correct about pure javascript. I've been
using the Micosoft ActiveX XMLDOM not the java XMLDOM, but my code is
still javascript. Here is the object I use:

locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.5.0" )
//locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.4.0" )
//locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0" )
//locXML = new ActiveXObject("MSXML2.DOMDocument.5.0")
//locXML = new ActiveXObject("MSXML2.DOMDocument.4.0")
//locXML = new ActiveXObject("MSXML2.DOMDocument.3.0")

if (typeof(locXML) == 'undefined') {
alert('Error: you must have the XML DOM installed')
} else {
locXML.async = false
locXML.validateOnParse = true;
locXML.resolveExternals = true;
locXML.setProperty("SelectionLanguage", "XPath");
}
locXML.load(my file name)
locXML.save(my file name)

Sorry about the confusion, you do need activeX.
Mar 4 '07 #39

P: n/a
RickH <pa******@windcrestsoftware.comwrote:
Sorry about the confusion, you do need activeX.
OK, no prob ;-)

i think ActiveX doesn't exists on MacOS X right ?

in the past (about 8 years ago) it was a trick (really unusual and
complicated) to save a file, from Nestscape 4.0.x using JavaScript.

i don't remember the procedure.
--
Une Bévue
Mar 5 '07 #40

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
OOOOO! Luogo che molto buon avete! Saluti da Milano:) http://www.nuovi5y.org/dj-italia

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 5 '07 #41

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
sono eccitato circa questo luogo, buon lavoro!:) http://www.nuovi5y.org/figa

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 5 '07 #42

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Luogo grande! Grande giusto! I miei riguardi migliori al proprietario:) http://www.nuovi5y.org/fiorentina

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 5 '07 #43

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
OOOOO! Luogo che molto buon avete! Saluti da Milano:) http://www.nuovi5y.org/umbria

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 5 '07 #44

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Grande! Il luogo cose buon, tutto e abbastanza ragionevole e piacevole.. http://www.nuovi5y.org/tattoo

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 5 '07 #45

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Stupore! ho una sensibilit molto buona circa il vostro luogo!!!! http://www.nuovi5y.org/topless

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 5 '07 #46

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Grande sito!! http://www.cartk5e68.org/la-scala

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 6 '07 #47

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
i'am really impressed!! http://www.cartk5e68.org/keira-knightley

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 6 '07 #48

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Luogo interessante. Info molto importante, grazie molto! http://www.cartk5e68.org/pasta

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 6 '07 #49

P: n/a
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Luogo grande! Grande giusto! I miei riguardi migliori al proprietario:) http://www.cartk5e68.org/alitalia

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 6 '07 #50

90 Replies

This discussion thread is closed

Replies have been disabled for this discussion.