C# xml文档查找 节点 并修改(添加)子节点 如下面的问题补充
<?xmlversion="1.0"encoding="UTF-8"?><playlistxmlns="http://xspf.org/ns/0/"xmlns:vlc="...
<?xml version="1.0" encoding="UTF-8"?>
<playlist xmlns="http://xspf.org/ns/0/" xmlns:vlc="http://www.videolan.org/vlc/playlist/ns/0/" version="1">
<title>播放列表</title>
<trackList>
<track>
<title>数字多媒体</title>
<location>file:///E:/FFOutput/Digital%20Media.avi</location>
<duration>2977000</duration>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:id>0</vlc:id>
</extension>
</track>
<track>
<location>file:///E:/FFOutput/%E5%86%B0%E6%B2%B3%E4%B8%96%E7%BA%AA%E7%95%AA%E5%A4%96%E7%AF%87%E4%B9%8B%E5%B9%B8%E5%AD%98%E7%9A%84%E5%B8%8C%E5%BE%B7.mkv</location>
<duration>479863</duration>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:id>1</vlc:id>
<vlc:option>file-caching=300</vlc:option>
</extension>
</track>
</trackList>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:item tid="0" />
<vlc:item tid="1" />
</extension>
</playlist>
现在问题纠结的就是它有两个名称空间,一个默认,一个是vlc,怎么样才能获取默认的名称空间下“<trackList />”的节点 展开
<playlist xmlns="http://xspf.org/ns/0/" xmlns:vlc="http://www.videolan.org/vlc/playlist/ns/0/" version="1">
<title>播放列表</title>
<trackList>
<track>
<title>数字多媒体</title>
<location>file:///E:/FFOutput/Digital%20Media.avi</location>
<duration>2977000</duration>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:id>0</vlc:id>
</extension>
</track>
<track>
<location>file:///E:/FFOutput/%E5%86%B0%E6%B2%B3%E4%B8%96%E7%BA%AA%E7%95%AA%E5%A4%96%E7%AF%87%E4%B9%8B%E5%B9%B8%E5%AD%98%E7%9A%84%E5%B8%8C%E5%BE%B7.mkv</location>
<duration>479863</duration>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:id>1</vlc:id>
<vlc:option>file-caching=300</vlc:option>
</extension>
</track>
</trackList>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:item tid="0" />
<vlc:item tid="1" />
</extension>
</playlist>
现在问题纠结的就是它有两个名称空间,一个默认,一个是vlc,怎么样才能获取默认的名称空间下“<trackList />”的节点 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询