Writing rss version tag

J

jimAH

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
 
A

Andy Dingley

jimAH said:
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)
 
?

=?ISO-8859-1?Q?J=FCrgen_Kahrs?=

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 ?
 
P

Peter Flynn

Jürgen Kahrs said:
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
 
J

Joseph Kesselman

Peter said:
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.
 
P

Peter Flynn

Joseph said:
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
 
A

Andy Dingley

Peter said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,999
Messages
2,570,244
Members
46,838
Latest member
KandiceChi

Latest Threads

Top