XML Processing: xmlstarlet expression to find entries in one file and copy it to another

Completato Pubblicato 5 anni fa Pagato alla consegna
Completato Pagato alla consegna

I need a shell script to do some XML processing, using xmlstarlet.

I have 2 xml files. I need to copy some elements from one file to the other.

Both files are the same kind. I want to find the following in [login to view URL]:

Under <glyf>, find this entire element:

<TTGlyph name="{0}" [... other attributes] >

[... content]

</TTGlyph>

Where {0} would be a list of strings to iterate a search for each string.

And then copy and replace in [login to view URL] where the same element occurs.

Then repeat the same operation under <gvar>:

<glyphVariations glyph="{0}">

[… content]

</glyphVariations>

I need to clarify {0} in:
<TTGlyph name="{0}" [... other attributes] >

I meant {0} would be a string, which would be from a list of strings that this script needs to iterate through for both type of elements.

Espressioni Regolari Script di Shell XML XSLT

Rif. progetto: #18119070

Info sul progetto

1 proposta Progetto a distanza Attivo 5 anni fa

Assegnato a:

grammal

Hi. As I understand, you would like a bash shell script that will replace some of the TTGlyph and glyphVariations in [login to view URL] with the versions in [login to view URL] with the same name, and xmlstarlet (xml) is an acceptable Altro

$35 AUD in 1 giorno
(15 valutazioni)
4.8