XmlDataSource

asp.net Egypt
  • 15 years ago


    hi,


    how  i can use XmlDataSource to handle complex and nested Xml Structure in asp.net 2.0 or any other efficient way
    the Xml Looks like that:
    <MailList>
    <Mail>
     <Title>Mail</Title>
     <Attachments>
        <Attachment id =1>            <Image>/9j/4AAQSkZJRgABAQEAZwBnAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAeACgDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDzyxttH/tYpa3EkbKv3kmOXP1z/Wtu7vH8PW6StDPN9pOyOR1LM30z1AyO/eoI9X0NJPLto0NxISwMcezaQBwxIHHH/wBauq0/WLW801LTWr1Ps5y0UduwYq2Oh7jnB9K8iFFV7upfTo+pNOn7S+uq7mA7S380ct0kKKFPy7QWGeue3as6aLVjLGdLv7kbDtZZSUiVQfug49Rjir2lJoUcs+bhraRJSUt8Z8znqx61oR+LrO7sbnw89rbrbqwMEhk2987QQeowO9JYZQi5SkvJWvoCpcseZy+Rh6mhu7a5sHtrdbkx7/lXdg5PIP8Aj60VnQyokc62puY75pBuDDzY8bcZLHkHOO/b8KK0gp0FyxktSbOGlzpbXT/Ddlp9zcXVs0t8Rut3EeN/HQDt9faqkmnW2qCZEvoLLb8srSZzGcEg8dM8iuQg8TzRTSt5IkjOQqu3IBwMZ7j/ABNSW2tPPazxiMK7oELYHQdKuVN8ylKO3n/WxUpK6bj+JoWtrpmjahbDUIlnhaQ7pJRw3I5I7D/Gum1Sfw1p979s0iNAkUTNNbxvtUk8Ar1wcsP/ANdef6fZyaiTLNIZEXIAkYk06aRFujFbQImxiqhjkdQK2hLl9x+8+pVKqoKzSb8yZr/UNRnmNrFIBJySGJII9/yoqaa9v7Gx8tZYgyMBlY+gNFZwU7e4lb5mGvSx/9k=</Image>
    </Attachment>
     </Attachments>


    thanks

  • 15 years ago

    Dear Hosam,


    If the data in your xml doc is not in a structure sutiable to directly bind to the control
    with the XmlDataSource class then
    you will need to transform it using a XSLT style sheet.
    The easiest way all depends on what your trying to do.


    Regards


    Brin

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” - Rick Osborne