Como substituir o texto dentro da tag no Notepad ++ de 2 arquivos Xml?

0

Exemplo:

Arquivo 1:

<CannonExp.xml>
<String>
    <ID>    1   </ID>
    <ASCII> Memiliki beberapa Giant crossbow yang dapat menyerang jarak jauh. Kelemahan fortress ini adalah defensenya yang masih lemah.    </ASCII>
    <Unicode>   TQBlAG0AaQBsAGkAawBpACAAYgBlAGIAZQByAGEAcABhACAARwBpAGEAbgB0ACAAYwByAG8AcwBzAGIAbwB3ACAAeQBhAG4AZwAgAGQAYQBwAGEAdAAgAG0AZQBuAHkAZQByAGEAbgBnACAAagBhAHIAYQBrACAAagBhAHUAaAAuACAASwBlAGwAZQBtAGEAaABhAG4AIABmAG8AcgB0AHIAZQBzAHMAIABpAG4AaQAgAGEAZABhAGwAYQBoACAAZABlAGYAZQBuAHMAZQBuAHkAYQAgAHkAYQBuAGcAIABtAGEAcwBpAGgAIABsAGUAbQBhAGgALgA=    </Unicode>
</String>
<String>
    <ID>    2   </ID>
    <ASCII> Dapat melemparkan batu besar yang menyebabkan serangan area. Kelemahan fortress ini adalah jarak serangannya yang terlalu pendek.   </ASCII>
    <Unicode>   RABhAHAAYQB0ACAAbQBlAGwAZQBtAHAAYQByAGsAYQBuACAAYgBhAHQAdQAgAGIAZQBzAGEAcgAgAHkAYQBuAGcAIABtAGUAbgB5AGUAYgBhAGIAawBhAG4AIABzAGUAcgBhAG4AZwBhAG4AIABhAHIAZQBhAC4AIABLAGUAbABlAG0AYQBoAGEAbgAgAGYAbwByAHQAcgBlAHMAcwAgAGkAbgBpACAAYQBkAGEAbABhAGgAIABqAGEAcgBhAGsAIABzAGUAcgBhAG4AZwBhAG4AbgB5AGEAIAB5AGEAbgBnACAAdABlAHIAbABhAGwAdQAgAHAAZQBuAGQAZQBrAC4A    </Unicode>
</String>
<String>
    <ID>    3   </ID>
    <ASCII> Dapat menembakkan banyak misil pada saat yang bersamaan. Kekuatan serangan besar dan kecepatan serangan yang tinggi. Memiliki kemampuan rata-rata.  </ASCII>
    <Unicode>   RABhAHAAYQB0ACAAbQBlAG4AZQBtAGIAYQBrAGsAYQBuACAAYgBhAG4AeQBhAGsAIABtAGkAcwBpAGwAIABwAGEAZABhACAAcwBhAGEAdAAgAHkAYQBuAGcAIABiAGUAcgBzAGEAbQBhAGEAbgAuACAASwBlAGsAdQBhAHQAYQBuACAAcwBlAHIAYQBuAGcAYQBuACAAYgBlAHMAYQByACAAZABhAG4AIABrAGUAYwBlAHAAYQB0AGEAbgAgAHMAZQByAGEAbgBnAGEAbgAgAHkAYQBuAGcAIAB0AGkAbgBnAGcAaQAuACAATQBlAG0AaQBsAGkAawBpACAAawBlAG0AYQBtAHAAdQBhAG4AIAByAGEAdABhAC0AcgBhAHQAYQAuAA==    </Unicode>
</String>   

Arquivo 2:

<CannonExp.xml>
<String>
    <ID>    1   </ID>
    <ASCII> Phao ?ai phong th? dung c? n? b?n ten nhi?u l?n t?n cong c? ly xa, s?c phong ng? h?i y?u la khuy?t ?i?m c?a no  </ASCII>
    <Unicode>   UABoAOEAbwAgABEB4ABpACAAcABoAPIAbgBnACAAdABoAOceIABkAPkAbgBnACAAYwDxHiAAbgDPHiAAYgCvHm4AIAB0AOoAbgAgAG4AaABpAMEedQAgAGwApx5uACAAdAClHm4AIABjAPQAbgBnACAAYwDxHiAAbAB5ACAAeABhACwAIABzAOkeYwAgAHAAaADyAG4AZwAgAG4AZwDxHiAAaAChAWkAIAB5AL8edQAgAGwA4AAgAGsAaAB1AHkAvx50ACAAEQFpAMMebQAgAGMA5x5hACAAbgDzAA==    </Unicode>
</String>
<String>
    <ID>    2   </ID>
    <ASCII> Phao ?ai phong th? kien c? va co kh? n?ng nem nh?ng t?ng ?a l?n t?o sat th??ng ph?m vi, t?m b?n h?i ng?n la nh??c ?i?m c?a no   </ASCII>
    <Unicode>   UABoAOEAbwAgABEB4ABpACAAcABoAPIAbgBnACAAdABoAOceIABrAGkA6gBuACAAYwDRHiAAdgDgACAAYwDzACAAawBoAKMeIABuAAMBbgBnACAAbgDpAG0AIABuAGgA7x5uAGcAIAB0AKMebgBnACAAEQHhACAAbADbHm4AIAB0AKEebwAgAHMA4QB0ACAAdABoALABoQFuAGcAIABwAGgAoR5tACAAdgBpACwAIAB0AKcebQAgAGIArx5uACAAaAChAWkAIABuAGcArx5uACAAbADgACAAbgBoALAB4x5jACAAEQFpAMMebQAgAGMA5x5hACAAbgDzAA==    </Unicode>
</String>

Arquivo após a substituição:

<CannonExp.xml>
<String>
    <ID>    1   </ID>
    <ASCII> Phao ?ai phong th? dung c? n? b?n ten nhi?u l?n t?n cong c? ly xa, s?c phong ng? h?i y?u la khuy?t ?i?m c?a no  </ASCII>
    <Unicode>   UABoAOEAbwAgABEB4ABpACAAcABoAPIAbgBnACAAdABoAOceIABkAPkAbgBnACAAYwDxHiAAbgDPHiAAYgCvHm4AIAB0AOoAbgAgAG4AaABpAMEedQAgAGwApx5uACAAdAClHm4AIABjAPQAbgBnACAAYwDxHiAAbAB5ACAAeABhACwAIABzAOkeYwAgAHAAaADyAG4AZwAgAG4AZwDxHiAAaAChAWkAIAB5AL8edQAgAGwA4AAgAGsAaAB1AHkAvx50ACAAEQFpAMMebQAgAGMA5x5hACAAbgDzAA==    </Unicode>
</String>
<String>
    <ID>    2   </ID>
    <ASCII> Phao ?ai phong th? kien c? va co kh? n?ng nem nh?ng t?ng ?a l?n t?o sat th??ng ph?m vi, t?m b?n h?i ng?n la nh??c ?i?m c?a no   </ASCII>
    <Unicode>   UABoAOEAbwAgABEB4ABpACAAcABoAPIAbgBnACAAdABoAOceIABrAGkA6gBuACAAYwDRHiAAdgDgACAAYwDzACAAawBoAKMeIABuAAMBbgBnACAAbgDpAG0AIABuAGgA7x5uAGcAIAB0AKMebgBnACAAEQHhACAAbADbHm4AIAB0AKEebwAgAHMA4QB0ACAAdABoALABoQFuAGcAIABwAGgAoR5tACAAdgBpACwAIAB0AKcebQAgAGIArx5uACAAaAChAWkAIABuAGcArx5uACAAbADgACAAbgBoALAB4x5jACAAEQFpAMMebQAgAGMA5x5hACAAbgDzAA==    </Unicode>
</String>
<String>
    <ID>    3   </ID>
    <ASCII> Dapat menembakkan banyak misil pada saat yang bersamaan. Kekuatan serangan besar dan kecepatan serangan yang tinggi. Memiliki kemampuan rata-rata.  </ASCII>
    <Unicode>   RABhAHAAYQB0ACAAbQBlAG4AZQBtAGIAYQBrAGsAYQBuACAAYgBhAG4AeQBhAGsAIABtAGkAcwBpAGwAIABwAGEAZABhACAAcwBhAGEAdAAgAHkAYQBuAGcAIABiAGUAcgBzAGEAbQBhAGEAbgAuACAASwBlAGsAdQBhAHQAYQBuACAAcwBlAHIAYQBuAGcAYQBuACAAYgBlAHMAYQByACAAZABhAG4AIABrAGUAYwBlAHAAYQB0AGEAbgAgAHMAZQByAGEAbgBnAGEAbgAgAHkAYQBuAGcAIAB0AGkAbgBnAGcAaQAuACAATQBlAG0AaQBsAGkAawBpACAAawBlAG0AYQBtAHAAdQBhAG4AIAByAGEAdABhAC0AcgBhAHQAYQAuAA==    </Unicode>
</String>

Deixe-me saber Plsss ..

    
por David Thái 19.08.2015 / 08:50

1 resposta

0

Aqui está uma abordagem bastante improvisada que às vezes usei. Digamos que você queira obter o texto do Arquivo A no Arquivo B, inserido em outro texto no Arquivo B.

Passo 1: Para cada arquivo, copie todo o conteúdo para o Word. Faça uma substituição de texto cuidadosa para preparar um texto Converter para tabela. Copie esta tabela para o Excel. Reformate conforme necessário, remova colunas, linhas ou células conforme necessário.

Etapa 2: configurar uma mala direta (tipo de catálogo) no Word, desenhando dados de ambos os arquivos, com o código XML necessário como proteção de janela.

Etapa 3: copie a saída e cole em um novo arquivo Notepad ++.

    
por 19.08.2015 / 14:08

Tags