EDN Admin
Well-known member
Hi
I have this XML:
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; <?<span style="color:#A31515; xml <span style="color:Red; version<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 1.0<span style="color:Black; " <span style="color:Red; encoding<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; utf-8<span style="color:Black; "<span style="color:Blue; ?>
<span style="color:Blue; <<span style="color:#A31515; product<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; productSummary<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; companyDescription<span style="color:Blue; >
<span style="color:Blue; <![CDATA[<span style="color:Gray; blablabla<span style="color:Blue; ]]>
<span style="color:Blue; </<span style="color:#A31515; companyDescription<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; companyLogo <span style="color:Red; imgUrl<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://localhost/demo/fullsize.jpg<span style="color:Black; " <span style="color:Red; id<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 12<span style="color:Black; " <span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; linkTo <span style="color:Red; target<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; map<span style="color:Black; " <span style="color:Red; url<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://localhost/MapSearch/map?id=12<span style="color:Black; " <span style="color:Red; caption<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Map<span style="color:Black; " <span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; linkTo <span style="color:Red; target<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; vCard<span style="color:Black; " <span style="color:Red; url<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://localhost/VisitCards?id=12<span style="color:Black; " <span style="color:Red; caption<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Visitcard<span style="color:Black; " <span style="color:Blue; />
<span style="color:Blue; </<span style="color:#A31515; productSummary<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; product<span style="color:Blue; >
[/code]
And Im not able to get the company logo URL. As of now I have this:
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; var query = (<span style="color:Blue; from itemId <span style="color:Blue; in element.Element(<span style="color:#A31515; "{" + xmlns + <span style="color:#A31515; "}product").Elements(<span style="color:#A31515; "{" + xmlns + <span style="color:#A31515; "}productSummary")
<span style="color:Blue; select itemId.Element(<span style="color:#A31515; "{" + xmlns + <span style="color:#A31515; "}companyLogo").Attribute(<span style="color:#A31515; "{" + xmlns + <span style="color:#A31515; "}imgUrl")).
FirstOrDefault();
<span style="color:Blue; return query.ToString();
[/code]
Where am I doing things wrong? A solution and some good tutorials would be nice.
Thanks in advance.
View the full article
I have this XML:
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; <?<span style="color:#A31515; xml <span style="color:Red; version<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 1.0<span style="color:Black; " <span style="color:Red; encoding<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; utf-8<span style="color:Black; "<span style="color:Blue; ?>
<span style="color:Blue; <<span style="color:#A31515; product<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; productSummary<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; companyDescription<span style="color:Blue; >
<span style="color:Blue; <![CDATA[<span style="color:Gray; blablabla<span style="color:Blue; ]]>
<span style="color:Blue; </<span style="color:#A31515; companyDescription<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; companyLogo <span style="color:Red; imgUrl<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://localhost/demo/fullsize.jpg<span style="color:Black; " <span style="color:Red; id<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 12<span style="color:Black; " <span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; linkTo <span style="color:Red; target<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; map<span style="color:Black; " <span style="color:Red; url<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://localhost/MapSearch/map?id=12<span style="color:Black; " <span style="color:Red; caption<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Map<span style="color:Black; " <span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; linkTo <span style="color:Red; target<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; vCard<span style="color:Black; " <span style="color:Red; url<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://localhost/VisitCards?id=12<span style="color:Black; " <span style="color:Red; caption<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Visitcard<span style="color:Black; " <span style="color:Blue; />
<span style="color:Blue; </<span style="color:#A31515; productSummary<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; product<span style="color:Blue; >
[/code]
And Im not able to get the company logo URL. As of now I have this:
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; var query = (<span style="color:Blue; from itemId <span style="color:Blue; in element.Element(<span style="color:#A31515; "{" + xmlns + <span style="color:#A31515; "}product").Elements(<span style="color:#A31515; "{" + xmlns + <span style="color:#A31515; "}productSummary")
<span style="color:Blue; select itemId.Element(<span style="color:#A31515; "{" + xmlns + <span style="color:#A31515; "}companyLogo").Attribute(<span style="color:#A31515; "{" + xmlns + <span style="color:#A31515; "}imgUrl")).
FirstOrDefault();
<span style="color:Blue; return query.ToString();
[/code]
Where am I doing things wrong? A solution and some good tutorials would be nice.
Thanks in advance.
View the full article