Re: LINQ and XML for compact framework



On May 1, 1:07 pm, "Jon Skeet [C# MVP]" <sk...@xxxxxxxxx> wrote:
On May 1, 12:43 pm, Wan <luo...@xxxxxxxxx> wrote:

I think it is complete,

No, it's definitely not.

Please create a windows application project
with smart device.  Put the code under Form.cs.  I don't think you
need to implement a 'Main'.

Only because Visual Studio creates another file for you that *does*
contain Main. Likewise the Form1.Designer.cs file contains
InitializeComponent. Without that, it's not complete.

In short, I can't cut and paste the code into a text editor *on its
own* and compile from the command line, which is what I tend to do
with newsgroup posts. Again, please readhttp://pobox.com/~skeet/csharp/incomplete.html

You also *still* haven't said how it behaves differently to how you
expect it to.

Jon

Ok, I am not sure if you complie it from command line will help to see
the problem. As the program was complied with no errors.

I expect this piece of code can go to the XML I pasted, and find the
element as well as changing the value. However, it didn't changed
value. even though it found the XML file, loaded XML, ran the LINQ
statement. Finally when I check the value of "IEnumerable<XElement>
msgs" by watching this variable. It will give me such error message:


msgs.System.Collections.Generic.IEnumerator<TSource>.Current
'System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement>'
does not contain a definition for 'System' and no extension method
'System' accepting a first argument of type
'System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement>'
could be found (are you missing a using directive or an assembly
reference?)

I assume, it might be problem of 'System.Collections.Generic' for
compact framework, does not support the XElement type.

.



Relevant Pages

  • XMLAnalysisError.8007007E - The specified module could not be found
    ... we have installed XML for Analysis version 1.0 on Windows 2003 Server, ... however we are getting the following error message when connecting from ... We have confirmed that MSXML 3.0 is installed on the server. ... There are no errors in the windows event log. ...
    (microsoft.public.data.xmlanalysis)
  • Re: Python and XML Help
    ... xml to use some of the data I was going to be getting off of the ... It will just print me the error message that I have when I try ... for using ElementTree, I just currently don't know anything about it. ... def loadXmlFile: ...
    (comp.lang.python)
  • Re: Persisted XML files cannot be opened...
    ... I got the same error message, when I try to load xml data into my Dataset. ... "Persisted XML files cannot be opened with the version of the Microsoft XML ... I suppose the problem is in some of hotfix of IE 6.xx or MSXML. ...
    (microsoft.public.data.ado)
  • Re: Persisted XML files cannot be opened...
    ... I got the same error message, when I try to load xml data into my Dataset. ... "Persisted XML files cannot be opened with the version of the Microsoft XML ... I suppose the problem is in some of hotfix of IE 6.xx or MSXML. ...
    (microsoft.public.vb.winapi)
  • Re: XSL choose problem
    ... so your XML should have an attribute named Code on the ... Unfortunately I don't have an error message. ... > I's causing the custom error page to appear. ... > don't have any xml as it is created dynamically through the web page. ...
    (microsoft.public.dotnet.xml)

Loading