so basicly the aspx file is an xml file in disguise .. :P ..
but how do i go about importing this xml into an xslt file in the CMS? :-)
if i just use the "umbraco.library:GetXmlDocumentByUrl($url)" i get an error like this:
System.Xml.XmlException: There is no Unicode byte order mark. Cannot switch to
Unicode. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at
System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res) at
System.Xml.XmlTextReaderImpl.CheckEncoding(String newEncodingName) at
System.Xml.XmlTextReaderImpl.ParseXmlDeclaration(Boolean isTextDecl) at
System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.Load(XmlDocument
doc, XmlReader reader, Boolean preserveWhitespace) at
System.Xml.XmlDocument.Load(XmlReader reader) at
umbraco.library.GetXmlDocumentByUrl(String Url)
Hmm. I'd check the encoding of the page when you view it in a browser and make sure it's utf-8 and with a correct MIME type. In firefox you can do this by loading the page and going to TOOLS > PAGE INFO in the menus. If your mimetype needs changed you there is a package for doing just that in umbraco utilities.
xml output on .aspx page import into xslt ..?
i have this page in my CMS:
http://umbraco.dev/xml/staysNewsFeed.aspx
which contains a single usercontrol that outputs XML like this:
so basicly the aspx file is an xml file in disguise .. :P ..
but how do i go about importing this xml into an xslt file in the CMS? :-)
if i just use the "umbraco.library:GetXmlDocumentByUrl($url)" i get an error like this:
System.Xml.XmlException: There is no Unicode byte order mark. Cannot switch to Unicode. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res) at System.Xml.XmlTextReaderImpl.CheckEncoding(String newEncodingName) at System.Xml.XmlTextReaderImpl.ParseXmlDeclaration(Boolean isTextDecl) at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at umbraco.library.GetXmlDocumentByUrl(String Url)
How do I go about this issue? :-)
Hmm. I'd check the encoding of the page when you view it in a browser and make sure it's utf-8 and with a correct MIME type. In firefox you can do this by loading the page and going to TOOLS > PAGE INFO in the menus. If your mimetype needs changed you there is a package for doing just that in umbraco utilities.
You can also try
And see if you get a different result.
in the code it says:
<?xml version="1.0" encoding="utf-16"?>
but when i goto tools > page info:
it says UTF-8
what is going on here? :-s
used an XSLT extension for this import .. :-)
is working on a reply...