Link to home
Start Free TrialLog in
Avatar of aniston
aniston

asked on

XML attribute and  

I'm storing XML within my Sql Server 2000 database field as a VARCHAR.  The XML information looks like this:

<?xml version="1.0"?><AgendaSettings><DateFormat value="dddd, MMMM dd yyyy hh:mm tt" /></AgendaSettings>

The DateFormat value is later extracted and used within a dateformat routine on the client side to compose an actual date shown as HTML.  I'm wondering if it is possible to insert "&nbsp;" between the "yyyy" and "hh" so that when the date is shown within the browser there is at least 2 spaces between the year and the hour.

I've tried adding "&nbsp;" within the XML data like such:
... <DateFormat value="dddd, MMMM dd yyyy &nbsp; hh:mm tt"/> ...

But the server side .NET XmlDocument parser vomits up complaining about the incorrect format for the XML.

I'm leaning towards inserting some special character sequence so that the client side performs a serach/replace to insert the "&nbsp;" but was hoping for a cleaner solution.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial