Subject: RE: [xsl] XML does not support "&" character ?? From: "Joshua Allen" <joshuaa@xxxxxxxxxxxxx> Date: Thu, 14 Mar 2002 11:37:41 -0800 |
Yes, in XML, & is used to "escape" special characters such as < and >. To get an ampersand, just use & Joshua Allen Microsoft WebData XML 425.705.7857 > -----Original Message----- > From: Gregory Pearson [mailto:GregP@xxxxxxxxx] > Sent: Thursday, March 14, 2002 10:49 AM > To: < > Subject: [xsl] XML does not support "&" character ?? > > Hi. I'm converting data into XML and every time it reaches a "&" > character it throws an error. > > I'm running this example on IE 6.0 with MSXML 4.0 installed ... > > THIS WORKS: (THERE IS NO "&" CHARACTER BETWEEN FISH CHIPS) > > > <?xml version="1.0"?> > <?xml-stylesheet type="text/xsl"?> > > <records> > <record> > <FirstName>Fred</FirstName> > <LastName>Flintstone</LastName> > <FavoriteFood>Fish Chips</FavoriteFood> > </record> > </records> > > > THIS DOES NOT WORK: (SEE THE "&" BETWEEN FISH & CHIPS) > > > <?xml version="1.0"?> > <?xml-stylesheet type="text/xsl"?> > > <records> > <record> > <FirstName>Fred</FirstName> > <LastName>Flintstone</LastName> > <FavoriteFood>Fish & Chips</FavoriteFood> > </record> > </records> > > > > > ERROR MESSAGE: > > Whitespace is not allowed at this location. Error processing resource > 'file:///C:/Greg/NBS/vb/Web Site Analysis Tool/XML > [test]/DelMundo/Data.xml'. Line 9, Position 24 > > > <FavoriteFood>Fish & Chips</FavoriteFood> > -----------------------^ > > > > > WHY DOES XML NOT ALLOW THE "&" CHARACTER? > > THANKS > > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XML does not support "&" , Robert Koberg | Thread | [xsl] regarding spaces, Laura Jenkins |
Re: [xsl] XML does not support "&" , Robert Koberg | Date | [xsl] general purpose filter styles, Robert Sösemann |
Month |