| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 
 |  
Public Sub LinqTrioShowsGet()
        'Dim mdocument As XDocument = XDocument.Load("http://" + MonIP.Text + ":8580/directory/shows/")
        Dim mdocument As XDocument = <?xml version="1.0" encoding="UTF-8"?>
                                <feed xmlns="http://www.w3.org/2005/Atom" xml:base="http://localhost:8580/directory/shows/">
                                    <id>tag:kenjy,2013-07-01:0:/directory/shows/</id>
                                    <title>Directory feed for http://localhost:8580/directory/shows/</title>
                                    <updated>2013-07-01T20:40:05Z</updated>
                                    <link href="http://localhost:8580/directory/shows/" rel="self" type="application/atom+xml;type=feed"/>
                                    <entry xmlns="http://www.w3.org/2005/Atom" xmlns:viz="http://www.vizrt.com/atom">
                                        <title>ShowTest_A</title>
                                        <author>
                                            <name>Media Sequencer Engine</name>
                                        </author>
                                        <id>tag:kenjy,2013-07-01:0:/directory/shows/ShowTest_A.show</id>
                                        <updated>2013-07-01T20:40:05Z</updated>
                                        <summary>Show ShowTest_A</summary>
                                        <category term="directory" scheme="http://www.vizrt.com/types"/>
                                        <category term="show" scheme="http://www.vizrt.com/types"/>
                                        <category term="trio_legacy_collection" scheme="http://www.vizrt.com/types" label="Trio Legacy Collection"/>
                                        <link href="http://localhost:8580/show/directory/shows/ShowTest_A.show/" rel="alternate" type="application/atom+xml;type=feed"/>
                                        <link href="http://localhost:8580/directory/shows/ShowTest_A.show" rel="self" type="application/atom+xml;type=entry"/>
                                        <viz:empty>false</viz:empty>
                                    </entry>
                                    <entry xmlns="http://www.w3.org/2005/Atom" xmlns:viz="http://www.vizrt.com/atom">
                                        <title>ShowTest_B</title>
                                        <author>
                                            <name>Media Sequencer Engine</name>
                                        </author>
                                        <id>tag:kenjy,2013-07-01:0:/directory/shows/ShowTest_B.show</id>
                                        <updated>2013-07-01T20:40:05Z</updated>
                                        <summary>Show ShowTest_B</summary>
                                        <category term="directory" scheme="http://www.vizrt.com/types"/>
                                        <category term="show" scheme="http://www.vizrt.com/types"/>
                                        <category term="trio_legacy_collection" scheme="http://www.vizrt.com/types" label="Trio Legacy Collection"/>
                                        <link href="http://localhost:8580/show/directory/shows/ShowTest_B.show/" rel="alternate" type="application/atom+xml;type=feed"/>
                                        <link href="http://localhost:8580/directory/shows/ShowTest_B.show" rel="self" type="application/atom+xml;type=entry"/>
                                        <viz:empty>false</viz:empty>
                                    </entry>
                                </feed>
 
        Dim ns As XNamespace = "http://www.vizrt.com/atom"
        Dim response As IEnumerable(Of XElement) = From c In mdocument.Elements(ns + "entry") _
                       Where c.Element("link")
 
        For Each e In response
            rtBox1.Text += Chr(13) & e.ToString() & Chr(13)
        Next
    End Sub | 
Partager