Results 1 to 4 of 4

Thread: Xml file in Silverlight

  1. #1
    Join Date
    Jan 2010
    Posts
    311

    Xml file in Silverlight

    Hello,
    I am very new in the Silverlight corner. I have written a program (C # Application) in which I can save my training data. The whole is stored in an XML file. I have also created a Silverlight project which I created with the help of Visifire diagrams. Now I want to use the training data from the Application in the Silverlight application and create charts from them. I copy later on the xap file to my server up and tie it into my HTML page. How do I get the best out. I would love to work with the same object as in C # Application. Is it possible to de-serialization the XML? The whole process of creating diagrams is running locally to me. So Silverlight is likely also access my hard drive. What are all the possibilities of xml file in silverlight? Any advice or suggestion or description of xml file n sivleright is appreciated. Thank you.

  2. #2
    Join Date
    Nov 2009
    Posts
    333

    Re: Xml file in Silverlight

    I have not understood the problem yet. Can not you just migrate your existing code, read the XML file and produce it at your diagrams? How can processes the XML data here in the forum already in various topics. The C # code you can reuse should as far as if you are using, etc., for example, the XMLReader. With the local disk access, there can be problems (including a couple of topics is below), but if you have the XML file on your Web server available do, you can download it via HTTP and simple process. That will probably be the best.
    These are some of the similar threads, please check
    1) How to create SilverLight Components
    2) How to integrate Silverlight technology to Asp.net applications

  3. #3
    Join Date
    Dec 2009
    Posts
    204

    Re: Xml file in Silverlight

    Basically there are two main possibilities. The first possibility is the XMLReader and XMLWriter. This allows fast read and write XML data. This is particularly interesting in combination with Isolated Storage in. It is also interesting if you lots of data, which are delivered as a web service of, has to edit. XMLReader / XMLWriter are already long existing technologies and are therefore at this point no longer proceed. The second possibility is that LinQ to XML. LinQ is a new technology in. Net 3.5 (or rather, the languages of C # 3.0 and VB 9) and stands for "Language INtegrated Query) This means that one objects, collections, and in this case functional XML queries (SQL on ) can create similar. In LinQ to XML is the central element XElement. "This is a node in an XML structure dar. The XElement constructor is overloaded and has the following characteristics:

    XElement (XElement)
    Instantiate an XElement XElement using a different

    XElement (XName)
    Creates a new instance on the basis of a name (XName is the name)

    XElement (XStreamingElement)
    Creates a new instance from a XStreamingElement. For large XML data is the advantage of XStreamingElement

    XElement (XName, Object)
    Creates a new element with a name (XName) and an object (such as attribute, another XML element (XElement). Object can be, for example, the content as text

    XElement (XName, Object [])
    Creates a new element with a name (XName) and other objects such as attributes or XML elements.


    If we now build an XML tree, we can make this nest. The XML element "<data> My Data </ data>" would be defined the following way: var element = new XElement ("data", "My Data"), this is the first parameter is the name (XName on), the second parameter Content (Object). Will you build nested elements, so can the (last example) textual content instead of using another object. If you want to element "<data> <subitem /> </ data>" map that we can with the LinQ to XML mapping: var element = new XElement ("data", new XElement ("subitem")); This now looks very similar to COM from. Now we come to the query itself, however. This is a "taken from" (yes, SQL is select in advance, but has the reason that you can use.

  4. #4
    Join Date
    Jan 2010
    Posts
    311

    Re: Xml file in Silverlight

    Here the code I am working on

    Code:
    XmlReaderSettings XmlReaderSettings set = new ();
    set.ConformanceLevel = ConformanceLevel.Fragment;
    set.IgnoreWhitespace = true;
    set.IgnoreComments = true;
    XmlReader rdr = XmlReader ("FormatInfo.xml", settings);
    XDocument dc = XDocument.Load (rdr);
    
    XElement ele = Doc.Element ("UnitFormatInfo");
    IEnumerator UnitFormatInfo Element.Elements = (). GetEnumerator ();

Similar Threads

  1. Can silverlight 4 used to save or open a file?
    By Madison in forum Software Development
    Replies: 8
    Last Post: 13-08-2011, 12:22 PM
  2. Silverlight.msi File Missing
    By Visitator in forum Windows Software
    Replies: 5
    Last Post: 28-04-2011, 10:25 AM
  3. How to create .exe file for my silverlight application?
    By Robert Beck in forum Technology & Internet
    Replies: 4
    Last Post: 18-04-2011, 10:45 AM
  4. Replies: 2
    Last Post: 09-08-2010, 09:41 AM
  5. Silverlight 4 FTP File Upload
    By Mr Alfa in forum Windows Software
    Replies: 4
    Last Post: 03-08-2010, 04:46 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,625,247.30447 seconds with 17 queries