Skip to main content
Home Forums General Silverlight Getting Started How to use XMLDocument in Silverlight
14 replies. Latest Post by juliako on December 9, 2008.
(0)
lmenaria
Member
16 points
14 Posts
03-15-2008 2:37 AM |
Hello,
I want to use System.XML, so we can parse the xml document with XMLDocument class, but in xaml.cs I am not able to find XMLDocument, so how can I do that....
Thanks
Laxmilal
mchlsync
Star
14566 points
2,730 Posts
03-15-2008 3:22 AM |
You can use XDocument from LINQ. I used to use like that. It's pretty cool
XDocument xmlProducts = XDocument.Parse(xmlContent); var products = from product in xmlProducts.Descendants("Product") select new { ProductID = Convert.ToInt32(product.Element("ProductId").Value), ProductName = (string)product.Element("ProductName").Value };
deepikaFO
14 points
7 Posts
05-09-2008 2:44 AM |
Hi,
iam getting the xmlcontent,
but in the products iam not getting any values,
iam getting error like this: [EmptyEnumerable]Arguments:Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=2.0.30226.2&File=System.Core.dll&Key=EmptyEnumerable
Can any one tell how to the xmlconent?
iam getting the string in xmlformat ,
it contains some nodes,
i want to get the value of the node into a arry ,
Can u please explaine how u read the product?
sladapter
All-Star
17181 points
3,133 Posts
05-09-2008 11:10 AM |
Can you show your XML here?
05-10-2008 6:57 AM |
Thanks For Replying,
i solved that problem,
i have one more error:
An exception of type 'System.ServiceModel.ProtocolException' occurred in System.ServiceModel.dll but was not handled in user code
How to solve this?
when isearched i got ans as add "clientaccesspolicy.xml" in the root domain.
this one iam not getting how to add?
i have one "silverlight Applciation"
one "Web service"
after calling web service in silverlgith application and run iam getting this error.
Please Reply me ASAP.
Thanks & Reagards
Deepika
05-10-2008 8:37 AM |
Deepika,
Try this http://silverlight.net/forums/p/12495/41047.aspx
05-12-2008 1:52 AM |
i have seen that http://silverlight.net/forums/p/12495/41047.aspx.
But iam not understanding properly what to do?
Can any one gives me steps how to access Webservice from silverlgiht application?
Jim Mangaly
Contributor
2610 points
380 Posts
05-12-2008 2:04 AM |
Please see this post: http://silverlight.net/forums/p/15888/52427.aspx#52427. Check out the Tim Heuer post I referred to in that thread. You will find a sample in that post that shows how you can access a web service from a Silverlight app.
Hope this helps,Jim (http://jimmangaly.blogspot.com/)
Please MARK the replies as answers if they answered your question
deepikag...
8 points
8 Posts
05-28-2008 2:35 AM |
hi i am facing the same problem.
{
};
My XML file is:
<
</
</span>
</div>
in xmlcontent it is giving XMl data but i am not getting anything in id and image.
Please let me know what's the problem and possible solution.
05-28-2008 2:43 AM |
deepikaggupta:var divs = from div in xmldivisions.Descendants("div1")
05-28-2008 2:46 AM |
I tried that too but it still not working...... :(
i actully want the image source and want to display that iamge in one rectangle....how can i do it....
Bichitra
3 points
39 Posts
09-21-2008 9:12 AM |
I have the same problem. I have a method GetXmlDocument() which return XlDocument object.
I am not able to get XmlDocument Class in my silverlight project. Any body can help me. how to use.
( I have xml config file inside WebProject file , I want to write a service which return the xmldocument object and i want to parse the document in silverlight application),
09-21-2008 12:13 PM |
Silverlight does not support old XMLDocument/XMLEelement/XMLAttribute classes which are in .Net System.XML namespace.
However, you can use XDocument/XElement/XAttribute classes which are in System.Xml.Linq namesapce.
RockRake
2 Posts
10-01-2008 1:44 AM |
string value = "<Drawable><Objects><Item>1</Item></Objects><Objects><Item>2</Item></Objects><Objects><Item>3</Item> </Objects></Drawable>"
}
i think it work properly
Rakesh(rockRake)
Anjusoft
juliako
28 points
12-09-2008 5:06 PM |
Hi, you might find the following documentation helpful: http://msdn.microsoft.com/en-us/library/cc188996(VS.95).aspx.
I am the programming writer on the .Net Framework and Silverlight .Net Framework Managed XML team. If
you have questions, you can send me an email at juliako@microsoft.com.
Thank you,
Julia