BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] perl and xml
- Subject: [Discuss] perl and xml
- From: nobluspam5476 at penguinmail.com (R. Luoma)
- Date: Mon, 9 Oct 2017 13:49:41 -0400
This may be off-topic, but I am trying to manipulate
what I think is an "xml" file with perl (on a linux system).
I am not familiar with the ins and outs of xml
Consider the following -
<things>
<item>
<tagA>bogus001
</tagA>
<tagB>
TagA should actually be "good_tag_001"
</tagB>
<tagC> C stuff </tagC>
</item>
<item>
<tagA>bogus002 </tagA>
<tagB>
Some extra stuff.
TagA should actually be "good_tag_002" </tagB>
<tagC> some tabC info </tagC>
</item>
</things>
I want to change tagA contents so that
they contain the quoted text in tagB as follows
(note that I wish the contents of TagB and
and other tag items to remain unchanged) --
<things>
<item>
<tagA>good_tag_001</tagA>
<tagB>
TagA should actually be "good_tag_001"
</tagB>
<tagC> C stuff </tagC>
</item>
<item>
<tagA>good_tag_002</tagA>
<tagB>
Some extra stuff.
TagA should actually be "good_tag_002" </tagB>
<tagC> some tabC info </tagC>
</item>
</things>
Supposedly, perl has xml modules for this purpose,
but I am have difficulty figuring them out.
The above example is simple, but, ultimately,
I would be working on an xml file with many items
and each item would have many different tags.
Thanks,
--
R. Luoma
- Follow-Ups:
- [Discuss] perl and xml
- From: bill.n1vux at gmail.com (Bill Ricker)
- [Discuss] perl and xml
- Prev by Date: [Discuss] Boston Linux and Unix InstallFest LXV reminder, tomorrow Saturday October 7, 2017
- Next by Date: [Discuss] perl and xml
- Previous by thread: [Discuss] Boston Linux and Unix InstallFest LXV reminder, tomorrow Saturday October 7, 2017
- Next by thread: [Discuss] perl and xml
- Index(es):
