473,386 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Anyway to put xml tags into an aspx page?

I'm trying to format some data out as an RSS feed. I already have a
perfectly good ASPX page that does the same thing with an <asp:repeater> so
I figured I'd take the page change the html tags to RSS tags and it would
all work fine.

Problem is that it appears that there's no way to tell VS or the compiler
that I really do want to push out XML and it complains that the XML tags are
not valid in 'the active schema'

<%@ Page Language="C#" ContentType="text/xml" %>
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
<channel>
<title>My Title</title>
<link>http://www.mylink.com</link>
<asp:Repeater ID="Body" Runat="server">
<ItemTemplate>
<item>

....you get the idea.

I get a red squiggly under <rss that says 'the active schema does not
support the element rss', and of course the <asp: is equally unrecognised. I
have an RSS xsd file but there doesn't appear to be a way of making the ASPX
honor it (and even if I could would it still barf on the <asp: tags).

[Note: I know I can do it all in the code behind with an XMLWriter and yes
I've wasted more time on this than it would have taken me to write the code
but its the principle of it !!! :-) ]

Zman


Nov 18 '05 #1
2 1248
I don't think there is a way to insert them directly in teh aspx file you'll
have to put literal controls in the apsx file and out put the xml tags
codewize

cheers,
mortb
"ZMan" <news-replies@thezbuffer> wrote in message
news:OB*************@TK2MSFTNGP12.phx.gbl...
I'm trying to format some data out as an RSS feed. I already have a
perfectly good ASPX page that does the same thing with an <asp:repeater>
so I figured I'd take the page change the html tags to RSS tags and it
would all work fine.

Problem is that it appears that there's no way to tell VS or the compiler
that I really do want to push out XML and it complains that the XML tags
are not valid in 'the active schema'

<%@ Page Language="C#" ContentType="text/xml" %>
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
<channel>
<title>My Title</title>
<link>http://www.mylink.com</link>
<asp:Repeater ID="Body" Runat="server">
<ItemTemplate>
<item>

...you get the idea.

I get a red squiggly under <rss that says 'the active schema does not
support the element rss', and of course the <asp: is equally unrecognised.
I have an RSS xsd file but there doesn't appear to be a way of making the
ASPX honor it (and even if I could would it still barf on the <asp: tags).

[Note: I know I can do it all in the code behind with an XMLWriter and yes
I've wasted more time on this than it would have taken me to write the
code but its the principle of it !!! :-) ]

Zman

Nov 18 '05 #2
Even asp:literals won't work becuase they have to be inside <html><body> or
<html><head> to be valid and that will obviously make it invalid RSS. You
are more than likely still correct though.

Thanks
ZMan
"mortb" <mortb1<noospam<@hotmail.com> wrote in message
news:OW**************@TK2MSFTNGP09.phx.gbl...
I don't think there is a way to insert them directly in teh aspx file
you'll have to put literal controls in the apsx file and out put the xml
tags codewize

cheers,
mortb
"ZMan" <news-replies@thezbuffer> wrote in message
news:OB*************@TK2MSFTNGP12.phx.gbl...
I'm trying to format some data out as an RSS feed. I already have a
perfectly good ASPX page that does the same thing with an <asp:repeater>
so I figured I'd take the page change the html tags to RSS tags and it
would all work fine.

Problem is that it appears that there's no way to tell VS or the compiler
that I really do want to push out XML and it complains that the XML tags
are not valid in 'the active schema'

<%@ Page Language="C#" ContentType="text/xml" %>
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
<channel>
<title>My Title</title>
<link>http://www.mylink.com</link>
<asp:Repeater ID="Body" Runat="server">
<ItemTemplate>
<item>

...you get the idea.

I get a red squiggly under <rss that says 'the active schema does not
support the element rss', and of course the <asp: is equally
unrecognised. I have an RSS xsd file but there doesn't appear to be a way
of making the ASPX honor it (and even if I could would it still barf on
the <asp: tags).

[Note: I know I can do it all in the code behind with an XMLWriter and
yes I've wasted more time on this than it would have taken me to write
the code but its the principle of it !!! :-) ]

Zman


Nov 18 '05 #3

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

Similar topics

8
by: Kathleen Dollard | last post by:
Hi, Oleg's answer about attribute value templates led me to look back at a different problem, and wonder if someone else had solved it. I want to output an ASP.NET page. Thus I need to output...
7
by: Rocky Moore | last post by:
I have a web site called HintsAndTips.com. On this site people post tips using a very simply webform with a multi line TextBox for inputing the tip text. This text is encode to HTML so that no...
2
by: Jeffrey T. | last post by:
I had some JavaScript functions defined in the <SCRIPT> section at the top of an aspx page (tested fine there). I then moved the JavaScript functions to their own separate file and then...
7
by: Jack | last post by:
Hello, What is the difference between SRC and CODEBEHIND Tags? Example <%@ Page Language="vb" ValidateRequest="false" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" %> or
0
by: Richard Steele (Basemap) | last post by:
VisualStudio 2005 Release having developed a webform with embedded tags such as <a href="javascript:OpenPopupPage('Calendar.aspx','<%= WeekEnding2.ClientID %>','<%= Page.IsPostBack %>');"> ...
10
by: Barry L. Camp | last post by:
Hi all... hope someone can help out. Not a unique situation, but my search for a solution has not yielded what I need yet. I'm trying to come up with a regular expression for a...
2
by: =?Utf-8?B?Sm9zaCBOaWtsZQ==?= | last post by:
I hope someone can help with this, because it’s driving me crazy. It’s also a little tough to describe what’s happening, but I’ll do my best. I have a class that takes a ProductID and...
3
by: MikeB | last post by:
Hello, I have a content page that is from a Master page which has 2 content panes. How do I add my forms to the content page? Each pane needs a form but you can not have multiple form tags nor...
4
by: King Coffee | last post by:
Hi, If I use master pages with META tags in the head section... can I still use META tag on the child pages (child pages reference the master page). I ask this question because I heard the more...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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...

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.