User Profile

Collapse

Profile Sidebar

Collapse
Denny Lam
Denny Lam
Last Activity: Jun 21 '11, 01:36 PM
Joined: Jun 13 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Denny Lam
    replied to Reading XML in 1 line.
    Can you please explain how to use Linq?

    XML:
    <books>
    <book>
    <Author>AuthorT xt</Author>
    <Title>TitleTxt </Title>
    </book>
    </books>

    When I try using your LINQ to look for book it works but when I try to look for Author it crashes.
    See more | Go to post

    Leave a comment:


  • Denny Lam
    replied to Reading XML in 1 line.
    I guess you're right.
    I wanted to find a build-in method and avoid loading it to memory but DataSet is not that bad.
    Thanks

    ex: xmlFile "XMLFile1.x ml"
    xmlPath "/books/book/Author"

    XML:
    <?xml version="1.0" encoding="utf-8" ?>
    <books>
    <book>
    <Author>AuthorT xt</Author>
    </book>
    </books>...
    See more | Go to post

    Leave a comment:


  • Denny Lam
    replied to Reading XML in 1 line.
    I want to avoid using collections. All I want to do is to pull a simple value out from the xml.

    Thanks
    See more | Go to post

    Leave a comment:


  • Denny Lam
    replied to foreach error
    if you want something Enumerable, you got to create a class that implements IEnumerable. Take a look at this example.
    http://www.codeproject.com/KB/cs/csenumerators.aspx

    If you're totally new to C#, I would suggest learning implementing IComparable first. IComparable allows you to compare object using '<', '>', '='.

    ex: object1 > object2...
    See more | Go to post

    Leave a comment:


  • Denny Lam
    started a topic Reading XML in 1 line.

    Reading XML in 1 line.

    The XML I have is same as web.config where data do not repeat. I want a very handy method to pull data out of the xml.

    What I want is ex:

    1. Response.Write( Xml("\\Roots\No de\Element"))

    2. <% Xml("\\Roots\No de\Element") %>

    I've gone through many example with XMLReader, Xnode, etc.. but they all involve looping over the xml which I don't want. I want to point it...
    See more | Go to post
No activity results to display
Show More
Working...