473,508 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Writing rss version tag

Hi all,

I'm trying to add the tag <rss version="2.0"> </rss> to an xml file
using asp.
Any ideas on how to do this? I'm a XML / RSS newbie!

I'm coming unstuck as (a) the tage contains a space character and (b)
the start of the tag is longer than the end of the tag

The rest of the xml is there, I just need to add this so it can be
viewable in a rss viewer.

Apols if this is the wrong group.

Thanks in advance for any help.

James

Apr 27 '06 #1
6 1078
jimAH wrote:
I'm trying to add the tag <rss version="2.0"> </rss> to an xml file
using asp.


Use MSXML.

Don't "add to the file", load the file into a DOM, get the DOM how you
like it (probably by appending it as a fragment to another DOM that
you've already placed <rss> into).

Use the DOM's serialisation (write it straight into the ASP Response
object) to turn it all back into a "file" or HTTP document.
Don't work with tags in XML, work with elements instead.

Don't ever, ever, EVER work with XML as files. Use a DOM (or SAX)

Apr 27 '06 #2
Andy Dingley <di*****@codesmiths.com> wrote:
jimAH wrote:
I'm trying to add the tag <rss version="2.0"> </rss> to an xml file
Don't ever, ever, EVER work with XML as files. Use a DOM (or SAX)


Did you notice that the notion of a "file" comes
quite naturally to user's minds, while the notion
of a "DOM" is still surrounded by some kind of voodoo ?
Apr 27 '06 #3
Jürgen Kahrs wrote:
Andy Dingley <di*****@codesmiths.com> wrote:
jimAH wrote:
I'm trying to add the tag <rss version="2.0"> </rss> to an xml file

Don't ever, ever, EVER work with XML as files. Use a DOM (or SAX)


Did you notice that the notion of a "file" comes
quite naturally to user's minds, while the notion
of a "DOM" is still surrounded by some kind of voodoo ?


That's because we've been using the file as the storage unit for
50 years. And even DOM-manipulated data gets stored on disk as a
file (or part of one, eventually).

I still have to pass a dead chicken over my keyboard every time I
use the DOM :-) and it's not appropriate for every task...

///Peter
--
"When all you have is a chainsaw, everything looks like a tree"
Apr 27 '06 #4
Peter Flynn wrote:
I still have to pass a dead chicken over my keyboard every time I
use the DOM :-) and it's not appropriate for every task...


I can't advise you on whether a chicken is the proper scacrifice for
every task; I generally burn a Fortran manual when I need to invoke the
programming gods.

But I agree that the DOM isn't appropriate for every task. I included an
entry regarding that in the DOM FAQ document. Sometimes SAX makes more
sense; sometimes custom models and/or databinding are the best answer.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Apr 27 '06 #5
Joseph Kesselman wrote:
Peter Flynn wrote:
I still have to pass a dead chicken over my keyboard every time I
use the DOM :-) and it's not appropriate for every task...
I can't advise you on whether a chicken is the proper scacrifice for
every task; I generally burn a Fortran manual when I need to invoke the
programming gods.


Ada manuals make a much more satisfying blaze. Oddly, COBOL manuals
don't seem to burn at all...
But I agree that the DOM isn't appropriate for every task. I included an
entry regarding that in the DOM FAQ document. Sometimes SAX makes more
sense; sometimes custom models and/or databinding are the best answer.


Sometimes I use grep, sed, and awk, but don't tell anyone :-)

///Peter
Apr 27 '06 #6
Peter Flynn wrote:
I still have to pass a dead chicken over my keyboard every time I
use the DOM :-) and it's not appropriate for every task...


You know why IE7 has just been released for beta?

With all the risk of bird flu at present there are going to be massive
numbers of chickens being slaughtered. It's the only way Byll
Ghateshoth can get the requisite sacrifices for a mass rollout.
Windows is going to run _really_ well for a week or two.

Apr 28 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1158
by: Jeff Gutsell | last post by:
Are there any reasonably complete online references for scripting with both the W3C DOM and the MS DOM? I've got the JavaScript Bible at home but I don't have the CD that came with it, and I find...
385
16876
by: Xah Lee | last post by:
Jargons of Info Tech industry (A Love of Jargons) Xah Lee, 2002 Feb People in the computing field like to spur the use of spurious jargons. The less educated they are, the more they like...
29
3530
by: Glen | last post by:
Is it possible to write a structure to a file in c...as in c++...?? is it using fwrite?? thanx glen
4
1737
by: Gary Bond | last post by:
Hi All, Can anybody point me to some 'how-to' documentation, tutorials, etc as to how to write a shrink/protect wrapper for .Net exes/dlls, (like the Shrinkwrap product for instance). I have...
14
1931
by: Steven D'Aprano | last post by:
I came across an interesting (as in the Chinese curse) problem today. I had to modify a piece of code using generator expressions written with Python 2.4 in mind to run under version 2.3, but I...
8
7172
by: FM | last post by:
Hello: I want to create a trigger wich performs a write-action to a text file. I'm intending to create it with: CREATE TRIGGER TR_ALARMA_TSPRE AFTER INSERT ON T_ALARMA_TS FOR EACH STATEMENT...
3
2678
by: Barry Flynn | last post by:
Hi I am working with a VB 2005 program which has been converted from VB6. It writes data out to a flat file, with code like the following line WriteLine(riFileNo, "Hist", lsAssetID,...
89
3764
by: Skybuck Flying | last post by:
Hello, This morning I had an idea how to write Scalable Software in general. Unfortunately with Delphi 2007 it can't be done because it does not support operating overloading for classes, or...
0
7135
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7342
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7410
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7067
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.