Edit an XML document through a function in ASP.NET C#



I'm having difficulty trying to parse an XML document to delete certain attributes. The only difficulty is the root element node is not the same. So I'm looking to run the XML document through a function to return an xml document without the attributes and with the root element node to be somtehing static like 'Match'. Can anybody help?



<?xml version="1.0" encoding="UTF-8" ?>
<Match3146>
<dateTime>2014-11-15T19:00Z</dateTime>
<winnerId>3498</winnerId>
<matchId>3146</matchId>
<maxGames>3</maxGames>
<isLive>false</isLive>
<isFinished>1</isFinished>
<tournament>
<id>181</id>
<name>Single Elimination Bracket</name>
<round>1</round>
</tournament>
<contestants>
<blue>
<id>2928</id>
<name>Zenith eSports</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/zenith%20White.png?itok=KP05dZzX</logoURL>
<acronym>ZEN</acronym>
<wins>1</wins>
<losses>2</losses>
</blue>
<red>
<id>3498</id>
<name>Final Five</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/final%20five.png?itok=oWoUEBb4</logoURL>
<acronym></acronym>
<wins>2</wins>
<losses>1</losses>
</red>
</contestants>
<liveStreams>false</liveStreams>
<polldaddyId>8451329:38449865:38449866</polldaddyId>
<games>
<game0>
<id>4122</id>
<winnerId>2928</winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game0>
<game1>
<id>4172</id>
<winnerId>3498</winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game1>
<game2>
<id>4173</id>
<winnerId>3498</winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game2>
</games>
<name>Zenith eSports vs Final Five</name>
</Match3146>
<Match3147>
<dateTime>2014-11-16T21:00Z</dateTime>
<winnerId>3494</winnerId>
<matchId>3147</matchId>
<url>/tourney/match/3147</url>
<maxGames>3</maxGames>
<isLive>false</isLive>
<isFinished>1</isFinished>
<tournament>
<id>181</id>
<name>Single Elimination Bracket</name>
<round>1</round>
</tournament>
<contestants>
<blue>
<id>3494</id>
<name>Enemy Esports</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/NME-LogoWhite.png?itok=lJNmnRlw</logoURL>
<acronym></acronym>
<wins>2</wins>
<losses>0</losses>
</blue>
<red>
<id>3502</id>
<name>Noble Truth</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/NobleTruthNTR.png?itok=WP5fdE40</logoURL>
<acronym></acronym>
<wins>0</wins>
<losses>2</losses>
</red>
</contestants>
<liveStreams>false</liveStreams>
<polldaddyId> </polldaddyId>
<games>
<game0>
<id>4123</id>
<winnerId>3494</winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game0>
<game1>
<id>4179</id>
<winnerId>3494</winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game1>
</games>
<name>Enemy Esports vs Noble Truth</name>
</Match3147>
<Match3148>
<dateTime>2014-11-16T23:00Z</dateTime>
<winnerId>3495</winnerId>
<matchId>3148</matchId>
<url>/tourney/match/3148</url>
<maxGames>3</maxGames>
<isLive>false</isLive>
<isFinished>1</isFinished>
<tournament>
<id>181</id>
<name>Single Elimination Bracket</name>
<round>1</round>
</tournament>
<contestants>
<blue>
<id>3495</id>
<name>Team Fusion</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/FusionLogo-BiggerUglier.png?itok=I_GDoM3T</logoURL>
<acronym></acronym>
<wins>2</wins>
<losses>0</losses>
</blue>
<red>
<id>3501</id>
<name>Confusion Esports</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/TBD-ICON_FINAL_LIGHT_7.png?itok=EEulRiHQ</logoURL>
<acronym></acronym>
<wins>0</wins>
<losses>0</losses>
</red>
</contestants>
<liveStreams>false</liveStreams>
<polldaddyId> </polldaddyId>
<games>
<game0>
<id>4124</id>
<winnerId>3495</winnerId>
<noVods>1</noVods>
<hasVod>0</hasVod>
</game0>
<game1>
<id>4180</id>
<winnerId>3495</winnerId>
<noVods>1</noVods>
<hasVod>0</hasVod>
</game1>
</games>
<name>Team Fusion vs Confusion Esports</name>
</Match3148>
<Match3149>
<dateTime>2014-11-15T21:00Z</dateTime>
<winnerId>8</winnerId>
<matchId>3149</matchId>
<url>/tourney/match/3149</url>
<maxGames>3</maxGames>
<isLive>false</isLive>
<isFinished>1</isFinished>
<tournament>
<id>181</id>
<name>Single Elimination Bracket</name>
<round>1</round>
</tournament>
<contestants>
<blue>
<id>8</id>
<name>compLexity White</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/coLWhite_0.png?itok=uUAvTSC3</logoURL>
<acronym></acronym>
<wins>2</wins>
<losses>1</losses>
</blue>
<red>
<id>3499</id>
<name>Monstar Kittenz</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/monstar%20kittenz.png?itok=YdQOTjpq</logoURL>
<acronym></acronym>
<wins>1</wins>
<losses>2</losses>
</red>
</contestants>
<liveStreams>false</liveStreams>
<polldaddyId> </polldaddyId>
<games>
<game0>
<id>4125</id>
<winnerId>8</winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game0>
<game1>
<id>4174</id>
<winnerId>3499</winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game1>
<game2>
<id>4175</id>
<winnerId>8</winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game2>
</games>
<name>compLexity White vs Monstar Kittenz</name>
</Match3149>
<Match3150>
<dateTime>2014-11-15T23:00Z</dateTime>
<winnerId>5</winnerId>
<matchId>3150</matchId>
<url>/tourney/match/3150</url>
<maxGames>3</maxGames>
<isLive>false</isLive>
<isFinished>1</isFinished>
<tournament>
<id>181</id>
<name>Single Elimination Bracket</name>
<round>1</round>
</tournament>
<contestants>
<blue>
<id>5</id>
<name>Team Coast</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/TeamCoast-%28FullColor%29.png?itok=TlNN0KkZ</logoURL>
<acronym>CST</acronym>
<wins>2</wins>
<losses>0</losses>
</blue>
<red>
<id>3503</id>
<name>Call Gaming</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/Call%20Gaming%20Final.png?itok=Jipa5Pog</logoURL>
<acronym></acronym>
<wins>0</wins>
<losses>2</losses>
</red>
</contestants>
<liveStreams>false</liveStreams>
<polldaddyId> </polldaddyId>
<games>
<game0>
<id>4126</id>
<winnerId>5</winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game0>
<game1>
<id>4176</id>
<winnerId>5</winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game1>
</games>
<name>Team Coast vs Call Gaming</name>
</Match3150>
<Match3151>
<dateTime>2014-11-16T19:00Z</dateTime>
<winnerId>1254</winnerId>
<matchId>3151</matchId>
<url>/tourney/match/3151</url>
<maxGames>3</maxGames>
<isLive>false</isLive>
<isFinished>1</isFinished>
<tournament>
<id>181</id>
<name>Single Elimination Bracket</name>
<round>1</round>
</tournament>
<contestants>
<blue>
<id>1254</id>
<name>Team LolPro</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/LoLPro_logo.png?itok=k5Z9chVo</logoURL>
<acronym>PRO</acronym>
<wins>2</wins>
<losses>0</losses>
</blue>
<red>
<id>3500</id>
<name>Fission Esports</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/fis-fission.png?itok=UbFP__9Z</logoURL>
<acronym></acronym>
<wins>0</wins>
<losses>2</losses>
</red>
</contestants>
<liveStreams>false</liveStreams>
<polldaddyId> </polldaddyId>
<games>
<game0>
<id>4127</id>
<winnerId>1254</winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game0>
<game1>
<id>4177</id>
<winnerId>1254</winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game1>
</games>
<name>Team LolPro vs Fission Esports</name>
</Match3151>
<Match3152>
<dateTime>2014-11-22T21:00Z</dateTime>
<winnerId></winnerId>
<matchId>3152</matchId>
<url>/tourney/match/3152</url>
<maxGames>3</maxGames>
<isLive>false</isLive>
<isFinished>0</isFinished>
<tournament>
<id>181</id>
<name>Single Elimination Bracket</name>
<round>2</round>
</tournament>
<contestants>
<blue>
<id>1148</id>
<name>compLexity Black</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/coLBlack_0.png?itok=-M4yVwqX</logoURL>
<acronym>COL</acronym>
<wins>0</wins>
<losses>0</losses>
</blue>
<red>
<id>3498</id>
<name>Final Five</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/final%20five.png?itok=oWoUEBb4</logoURL>
<acronym></acronym>
<wins>2</wins>
<losses>1</losses>
</red>
</contestants>
<liveStreams>false</liveStreams>
<polldaddyId>8452048:38453013:38453014</polldaddyId>
<games>
<game0>
<id>4128</id>
<winnerId></winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game0>
</games>
<name>compLexity Black vs Final Five</name>
</Match3152>
<Match3153>
<dateTime>2014-11-23T23:00Z</dateTime>
<winnerId></winnerId>
<matchId>3153</matchId>
<url>/tourney/match/3153</url>
<maxGames>3</maxGames>
<isLive>false</isLive>
<isFinished>0</isFinished>
<tournament>
<id>181</id>
<name>Single Elimination Bracket</name>
<round>2</round>
</tournament>
<contestants>
<blue>
<id>3494</id>
<name>Enemy Esports</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/NME-LogoWhite.png?itok=lJNmnRlw</logoURL>
<acronym></acronym>
<wins>2</wins>
<losses>0</losses>
</blue>
<red>
<id>3495</id>
<name>Team Fusion</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/FusionLogo-BiggerUglier.png?itok=I_GDoM3T</logoURL>
<acronym></acronym>
<wins>2</wins>
<losses>0</losses>
</red>
</contestants>
<liveStreams>false</liveStreams>
<polldaddyId>8453436:38459746:38459747</polldaddyId>
<games>
<game0>
<id>4129</id>
<winnerId></winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game0>
</games>
<name>Enemy Esports vs Team Fusion</name>
</Match3153>
<Match3154>
<dateTime>2014-11-22T23:00Z</dateTime>
<winnerId></winnerId>
<matchId>3154</matchId>
<url>/tourney/match/3154</url>
<maxGames>3</maxGames>
<isLive>false</isLive>
<isFinished>0</isFinished>
<tournament>
<id>181</id>
<name>Single Elimination Bracket</name>
<round>2</round>
</tournament>
<contestants>
<blue>
<id>1252</id>
<name>Curse Academy</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/curse-acad-light2.png?itok=Fi1UnDSi</logoURL>
<acronym>CA</acronym>
<wins>0</wins>
<losses>0</losses>
</blue>
<red>
<id>8</id>
<name>compLexity White</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/coLWhite_0.png?itok=uUAvTSC3</logoURL>
<acronym></acronym>
<wins>2</wins>
<losses>1</losses>
</red>
</contestants>
<liveStreams>false</liveStreams>
<polldaddyId>8452060:38453051:38453052</polldaddyId>
<games>
<game0>
<id>4130</id>
<winnerId></winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game0>
</games>
<name>Curse Academy vs compLexity White</name>
</Match3154>
<Match3155>
<dateTime>2014-11-23T21:00Z</dateTime>
<winnerId></winnerId>
<matchId>3155</matchId>
<url>/tourney/match/3155</url>
<maxGames>3</maxGames>
<isLive>false</isLive>
<isFinished>0</isFinished>
<tournament>
<id>181</id>
<name>Single Elimination Bracket</name>
<round>2</round>
</tournament>
<contestants>
<blue>
<id>5</id>
<name>Team Coast</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/TeamCoast-%28FullColor%29.png?itok=TlNN0KkZ</logoURL>
<acronym>CST</acronym>
<wins>2</wins>
<losses>0</losses>
</blue>
<red>
<id>1254</id>
<name>Team LolPro</name>
<logoURL>/sites/default/files/styles/grid_medium_square/public/LoLPro_logo.png?itok=k5Z9chVo</logoURL>
<acronym>PRO</acronym>
<wins>2</wins>
<losses>0</losses>
</red>
</contestants>
<liveStreams>false</liveStreams>
<polldaddyId>8453426:38459707:38459708</polldaddyId>
<games>
<game0>
<id>4131</id>
<winnerId></winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game0>
</games>
<name>Team Coast vs Team LolPro</name>
</Match3155>
<Match3156>
<dateTime>1970-01-01T00:00Z</dateTime>
<winnerId></winnerId>
<matchId>3156</matchId>
<url>/tourney/match/3156</url>
<maxGames>3</maxGames>
<isLive>false</isLive>
<isFinished>0</isFinished>
<tournament>
<id>181</id>
<name>Single Elimination Bracket</name>
<round>3</round>
</tournament>
<contestants />
<liveStreams>false</liveStreams>
<polldaddyId> </polldaddyId>
<games>
<game0>
<id>4132</id>
<winnerId></winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game0>
</games>
<name>TBD vs TBD</name>
</Match3156>
<Match3157>
<dateTime>1970-01-01T00:00Z</dateTime>
<winnerId></winnerId>
<matchId>3157</matchId>
<url>/tourney/match/3157</url>
<maxGames>3</maxGames>
<isLive>false</isLive>
<isFinished>0</isFinished>
<tournament>
<id>181</id>
<name>Single Elimination Bracket</name>
<round>3</round>
</tournament>
<contestants />
<liveStreams>false</liveStreams>
<polldaddyId> </polldaddyId>
<games>
<game0>
<id>4133</id>
<winnerId></winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game0>
</games>
<name>TBD vs TBD</name>
</Match3157>
<Match3158>
<dateTime>1970-01-01T00:00Z</dateTime>
<winnerId></winnerId>
<matchId>3158</matchId>
<url>/tourney/match/3158</url>
<maxGames>3</maxGames>
<isLive>false</isLive>
<isFinished>0</isFinished>
<tournament>
<id>181</id>
<name>Single Elimination Bracket</name>
<round>4</round>
</tournament>
<contestants />
<liveStreams>false</liveStreams>
<polldaddyId> </polldaddyId>
<games>
<game0>
<id>4134</id>
<winnerId></winnerId>
<noVods>0</noVods>
<hasVod>0</hasVod>
</game0>
</games>
<name>TBD vs TBD</name>
</Match3158>

No comments:

Post a Comment