请问如下两个xml文件个格式上有什么区别?用IE看是一样的,但是用XMLEditor看就不一样,用文件比较器看也不一样,谢谢,好像一有换行,二没有,是这样么?文件一用XMLEditor打开<Asx Version = "3.0" > 
<Title > test2</Title><Param Name = "encoding" Value = "UTF-8" /><Entry> 
<Title > All The Things She Said</Title><Ref href = "\Storage Card\musi_eng\all the things she said.mp3"/>
</Entry><Entry> 
<Title > All You Wanted</Title><Ref href = "\Storage Card\musi_eng\All You Wanted _ Michelle Branch.mp3"/>
</Entry><Entry> 
<Title > All Out Love</Title><Ref href = "\Storage Card\musi_eng\all_out_love.mp3"/>
</Entry><Entry> 
<Ref href = "\Storage Card\musi_eng\Complicated _ Avril Lavigne .mp3"/>
</Entry><Entry> 
<Ref href = "\Storage Card\musi_eng\Don't Know Why _ Norah Jones.mp3"/>
</Entry><Entry> 
<Ref href = "\Storage Card\musi_eng\dreams.mp3"/>
</Entry><Entry> 
<Ref href = "\Storage Card\musi_eng\Foolish _ Ashanti.mp3"/>
</Entry><Entry> 
<Ref href = "\Storage Card\musi_eng\Get The Party Started _ Pink.mp3"/>
</Entry><Entry> 
<Ref href = "\Storage Card\musi_eng\gone.mp3"/>
</Entry><Entry> 
<Ref href = "\Storage Card\musi_eng\How You Remind Me _ Nickelback.mp3"/>
</Entry><Entry> 
<Ref href = "\Storage Card\musi_eng\juliet.mp3"/>
</Entry><Entry> 
<Ref href = "\Storage Card\musi_eng\Landslide_ Dixie Chicks.mp3"/>
</Entry><Entry> 
<Ref href = "\Storage Card\musi_eng\long long way to go.mp3"/>
</Entry>
</Asx>文件二
<Asx Version="3.0"><Title>Main</Title><Param Name="encoding" Value="UTF-8"/><Entry><Title>音轨 3</Title><Ref href="\Storage Card\MSMETADATA\03-音轨 3.MP3"/></Entry><Entry><Title>love love love</Title><Ref href="\Storage Card\MSMETADATA\love.mp3"/></Entry><Entry><Title>白噪声</Title><Ref href="\Storage Card\MSMETADATA\白噪声.mp3"/></Entry><Entry><Title>2002年的第一场雪</Title><Ref href="\Storage Card\MSMETADATA\刀郎 2002年的第一场雪.mp3"/></Entry><Entry><Title>粉红噪声</Title><Ref href="\Storage Card\MSMETADATA\粉红噪声.mp3"/></Entry><Entry><Title>雷电、下雨声效</Title><Ref href="\Storage Card\MSMETADATA\雷电 下雨声效 音效测试 .mp3"/></Entry><Entry><Title>美丽的神话Ⅱ</Title><Ref href="\Storage Card\MSMETADATA\美丽的神话.mp3"/></Entry><Entry><Title>500HZ 方波 0DB</Title><Ref href="\Storage Card\MSMETADATA\500HZ 方波 0DB.mp3"/></Entry><Entry><Title>13/____</Title><Ref href="\Storage Card\13/____.MP3"/></Entry><Entry><Title>上海姑娘</Title><Ref href="\Storage Card\musi\張信哲 - 上海姑娘.wma"/></Entry><Entry><Title>快D快乐 (国)</Title><Ref href="\Storage Card\musi\陳慧琳 - 快D快樂 (國).wma"/></Entry><Entry><Title>菊花台</Title><Ref href="\Storage Card\musi\周杰伦 - 菊花台.mp3"/></Entry><Entry><Title>黄金甲</Title><Ref href="\Storage Card\musi\黄金甲.wma"/></Entry><Entry><Title>恋人未满</Title><Ref href="\Storage Card\musi\恋人未满.mp3"/></Entry><Entry><Title>10.对你有感觉</Title><Ref href="\Storage Card\musi\江美琪 - 對你有感覺.wma"/></Entry><Entry><Title>唯舞獨尊</Title><Ref href="\Storage Card\musi\蔡依林 - 唯舞独尊.wma"/></Entry><Entry><Title>05.将军令</Title><Ref href="\Storage Card\musi\吳克群 - 將軍令.wma"/></Entry><Entry><Title>眼看心勿动 [www.sn-pp.net.ru]</Title><Ref href="\Storage Card\musi\眼看心勿动.mp3"/></Entry><Entry><Title>www.uu150.com</Title><Ref href="\Storage Card\musi\昆明湖.wma"/></Entry><Entry><Title>弦子 - 是我不可爱(CD Version)</Title><Ref href="\Storage Card\musi\弦子 - 是我不可愛.mp3"/></Entry><Entry><Title>2bug</Title><Ref href="\Storage Card\musi\2bug.mid"/></Entry><Entry><Title>1bug</Title><Ref href="\Storage Card\musi\1bug.mid"/></Entry><Entry><Title>dreams</Title><Ref href="\Storage Card\musi_eng\dreams.mp3"/></Entry><Entry><Title>Complicated</Title><Ref href="\Storage Card\musi_eng\Complicated _ Avril Lavigne .mp3"/></Entry><Entry><Title>Don`t Know Why</Title><Ref href="\Storage Card\musi_eng\Don't Know Why _ Norah Jones.mp3"/></Entry><Entry><Title>gone</Title><Ref href="\Storage Card\musi_eng\gone.mp3"/></Entry><Entry><Title>Foolish</Title><Ref href="\Storage Card\musi_eng\Foolish _ Ashanti.mp3"/></Entry><Entry><Title>临府咖⑤</Title><Ref href="\Storage Card\musi_eng\juliet.mp3"/></Entry><Entry><Title>Get The Party started</Title><Ref href="\Storage Card\musi_eng\Get The Party Started _ Pink.mp3"/></Entry><Entry><Title>How You Remind Me</Title><Ref href="\Storage Card\musi_eng\How You Remind Me _ Nickelback.mp3"/></Entry><Entry><Title>Landslide</Title><Ref href="\Storage Card\musi_eng\Landslide_ Dixie Chicks.mp3"/></Entry><Entry><Title>Long, Long Way To Go (Remix by</Title><Ref href="\Storage Card\musi_eng\long long way to go.mp3"/></Entry><Entry><Title>All The Things She Said</Title><Ref href="\Storage Card\musi_eng\all the things she said.mp3"/></Entry><Entry><Title>All You Wanted</Title><Ref href="\Storage Card\musi_eng\All You Wanted _ Michelle Branch.mp3"/></Entry><Entry><Title>All Out Love</Title><Ref href="\Storage Card\musi_eng\all_out_love.mp3"/></Entry><Entry><Title>Alouette</Title><Ref href="\My Documents\我的音乐\Alouette.mid"/></Entry></Asx>

解决方案 »

  1.   

    那么我用MSXML怎么加入回车换行呢,谢谢~~
      

  2.   

    在xsl:template元素里加xml:space="preserve"属性
      

  3.   

    HRESULT put_preserveWhiteSpace(VARIANT_BOOL isPreserving)DOM用这个
      

  4.   

    ToperRay,在我添加某个节点后,我调用了m_pDoc->put_preserveWhiteSpace(VARIANT_TRUE);
    但是还是保存后用UltraEdit打开,还是没有换行符,谢谢~~,也没有空格,是不是用法不对?
      

  5.   

    我看了msdn的文档,这个方法用来设置在解析xml文档时是否忽略空格符