Ron Gibson
Ron Gibson

Reputation: 1

use & symbol in an xml feed

Please take a look at this feed: http://www.yourbestdeals.com/feeds/rss.aspx?r=test&citygroup=Boston

If you looks at the source code all the & symbols are actually &. However, I need the symbols in the link tag to just be & otherwise they don't work in my system.

The problem is when I change these symbols to & the xml feed becomes invalid as & symbols are not a valid xml format.

Is there any way around this?

Thanks

Upvotes: 0

Views: 202

Answers (2)

Quentin
Quentin

Reputation: 944169

Since & means & in XML (as opposed to & which means start of character reference), the XML is fine.

If it "doesn't work in your system" then you need to fix something else. The best guess I have is that something consuming the XML is not doing so using an XML parser (perhaps it is trying to parse XML with regular expressions, or perhaps you are copy/pasting the XML encoded URIs from the source).

Fix that instead of trying to hack the data.

Upvotes: 3

Andreas Wong
Andreas Wong

Reputation: 60584

& is the entity for ampersand, try replacing all & to &

Upvotes: 0

Related Questions