Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi.I'm having a problem with umbraco.library:GetXmlDocumentByUrl.I have this variable: <xsl:variable name="xname" select="umbraco.library:GetXmlDocumentByUrl('https://services.web.info.dk/api/prod/?user=lxxx&password=xxx&format=xml', 3600)"/> and this is working just fine.
But i need to get this in afterwards: &sincedays=10For this I have this variable: <xsl:variable name="sourceURLxml" select="umbraco.library:GetXmlDocumentByUrl(concat($xname, '&sincedays=14'))"/>
But here the error comes. When saving the XSLT file this is written: System.UriFormatException: Invalid URI: The Uri scheme is too long. at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at System.Net.WebRequest.Create(String requestUriString) at umbraco.library.GetXmlDocumentByUrl(String Url)
I can't use &sincedays=10 in the first variable that's why I'm using concat in the second variable.Hope any one can tell why the error comes./pth
This fails because you're already fetching XML in the first variable, and then you're using that XML as the URL in the second one - try this instead:
<xsl:variable name="sourceURL" select="'https://services.web.info.dk/api/prod/?user=lxxx&password=xxx&format=xml'" />
<xsl:variable name="sourceURL10days" select="concat($sourceURL, '&sincedays=10')" />
<xsl:variable name="sourceURLxml" select="umbraco.library:GetXmlDocumentByUrl($sourceURL10days, 3600)" />
Hi Chriztian.Of course. Got it working.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted