Attribute value choking parser?
-
Hi guys, not well versed in XML here.. *** Update -- After reading a document on well formed XML, I realized that ampersands in XML attributes need to appear as & or the numeric code. Please Ignore this post. Thanks! **** When I try to load the following XML string into a XmlDocument object (or IE for that matter) I get the following error: [From IE] The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. -------------------------------------------------------------------------------- A semi colon character was expected. Error processing resource 'file:///C:/VSProjects/WinForumProjects/WinForumInstallDirectory/ServerContentTest.xml'. Line 2, Position 65 The error occures right after the '&forum=' part of the attribute. It would seem to be trying to parse the attribute as HTML or something. How can I get the object to ignore the actual values of the attribute? Thanks Jeff
-
Hi guys, not well versed in XML here.. *** Update -- After reading a document on well formed XML, I realized that ampersands in XML attributes need to appear as & or the numeric code. Please Ignore this post. Thanks! **** When I try to load the following XML string into a XmlDocument object (or IE for that matter) I get the following error: [From IE] The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. -------------------------------------------------------------------------------- A semi colon character was expected. Error processing resource 'file:///C:/VSProjects/WinForumProjects/WinForumInstallDirectory/ServerContentTest.xml'. Line 2, Position 65 The error occures right after the '&forum=' part of the attribute. It would seem to be trying to parse the attribute as HTML or something. How can I get the object to ignore the actual values of the attribute? Thanks Jeff
Can you modify your post and turn off the html. Can not see the XML. If you insist in finding evil in me you will find it, whether it is there or not.
-
Hi guys, not well versed in XML here.. *** Update -- After reading a document on well formed XML, I realized that ampersands in XML attributes need to appear as & or the numeric code. Please Ignore this post. Thanks! **** When I try to load the following XML string into a XmlDocument object (or IE for that matter) I get the following error: [From IE] The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. -------------------------------------------------------------------------------- A semi colon character was expected. Error processing resource 'file:///C:/VSProjects/WinForumProjects/WinForumInstallDirectory/ServerContentTest.xml'. Line 2, Position 65 The error occures right after the '&forum=' part of the attribute. It would seem to be trying to parse the attribute as HTML or something. How can I get the object to ignore the actual values of the attribute? Thanks Jeff
You have a single & character in your xml. Character & cannot be used in text as it is used in markup (the same applies to < character). Replace each occurence of a single character '&' by a sequence of 5 chars &_a_m_p_;. I can't write them here together for the browser would render them to a single &. Just get rid of '_' from the presented sequence. HTH, Zdenek "It's never too late to have a happy childhood." [Tom Robbins]