Nevermind, I found the help I needed here. I may need help later on, but for now I can continue myself.
--------------
Hey there, thanks for reading.
I'm working on my first Windows Phone application, but I'm having some trouble right now. It's an application to keep track of donations to a small children's daycare. The idea is to keep track of what has anything that has recently been donated, and what people said that they might have (for example over the phone) so they can keep track of what to expect, what to look for and what to replace in the near future.
As I'm pretty new to Silverlight and C# (I do have plenty xHTML / CSS / PHP experience) I find it hard to parse and write to the XML file correctly. I've searched on MSDN and browsed trough a few pages of Google search results, but to no avail. I did find some examples, for example using XDocument, but then MSDN said it wasn't available for SL on Windows Phone.
Basically, I need a method that, depending on the input ...
# reads all items from the XML (to show a list on the app's main page)
# reads 1 specific item (for a detail view)
or
# reads either all received, or all expected donations
Also, I'm not quite sure what would be the best way to save the DateTime value to the XML. I assumed the best way would be splitting it up in day/month/year etc, but if there's a better solution I'll gladly take your advice.
If any of you could show me an example, or give me a push in the right direction, I would really appreciate it!
My current XML layout is below:
--------------
Hey there, thanks for reading.
I'm working on my first Windows Phone application, but I'm having some trouble right now. It's an application to keep track of donations to a small children's daycare. The idea is to keep track of what has anything that has recently been donated, and what people said that they might have (for example over the phone) so they can keep track of what to expect, what to look for and what to replace in the near future.
As I'm pretty new to Silverlight and C# (I do have plenty xHTML / CSS / PHP experience) I find it hard to parse and write to the XML file correctly. I've searched on MSDN and browsed trough a few pages of Google search results, but to no avail. I did find some examples, for example using XDocument, but then MSDN said it wasn't available for SL on Windows Phone.
Basically, I need a method that, depending on the input ...
# reads all items from the XML (to show a list on the app's main page)
# reads 1 specific item (for a detail view)
or
# reads either all received, or all expected donations
Also, I'm not quite sure what would be the best way to save the DateTime value to the XML. I assumed the best way would be splitting it up in day/month/year etc, but if there's a better solution I'll gladly take your advice.
If any of you could show me an example, or give me a push in the right direction, I would really appreciate it!
My current XML layout is below:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<donations>
<received>
<!-- begin sample data-->
<donation id="0">
<dateTime>
<day>18</day>
<month>2</month>
<year>2011</year>
<hours>5</hours>
<minutes>13</minutes>
</dateTime>
<contact>Henk</contact>
<items>Football, 2 tennis rackets</items>
<money>150.00</money>
<description>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ac justo dui, id aliquam erat. Aliquam quis lorem et nulla.</description>
</donation>
<!-- end sample data-->
</received>
<expected>
</expected>
</donations>
Last edited: