473,385 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Replace all first letter of xml tag into capital letter

Hi All,

I am hiving a file having data:

<name>InDia</name>

I want to change like:

<ST_Name>InDia</ST_Name>

I am able to change the 1st tag but not able to change the end tag as my expectaion.

i am using this script:
$string =~ s/(\w+)/ST_\u$1/;


Can any body help for the above issue.

Thanks,
dks
Sep 16 '11 #1
3 2355
try:
$string =~ s/(\w+)/ST_\u$1/g;
Sep 16 '11 #2
toolic
70 Expert
It is best to modify XML files using an XML parser. I recommend XML::Twig. The set_tag method is used to globally modify start and end tags.
Sep 17 '11 #3
Thanks for your help. But the o/p is not showing properly.

O/P:
<ST_Name>ST_InDia</ST_Name>

~DK
Sep 22 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Barry | last post by:
Hi all, I've noticed a strange error on my website. When I print a capital letter P with a dot above, using & #7766; it appears correctly, but when I use P& #0775 it doesn't. The following...
1
by: Marc Verdonck | last post by:
First: I have some troubles in access, some fields needs to begin with a Capital letter. Example: louiselaan need to be Louiselaan. How can I become this? Second: I'm exporting my database to...
0
by: Gidi | last post by:
Hi, i'm writing this question again, since i didn't get an answer in the reply i wrote, i hope it's ok. My user default language is hebrew and in some specific TextBoxs i want that the...
5
by: Agnes | last post by:
In textbox, there is a property (character casing), However, in combox , any method/property to set it (as the user input the text, it is default to upper case ? Thanks a lot
1
by: ntuyen01 | last post by:
Hi All, I have this data file with fix length(see below). I am able to insert it into the database using bcp, but now I want to skip (do not insert) the row which start with letter 'S' into the...
4
by: anufunny | last post by:
I am trying to compare 2 tables and trying to find out the common ones in that. The example goes like this. Table 1 Table 2 Company Type Company Address ABC ...
8
by: =?gb2312?B?yMvR1MLkyNXKx8zs0cSjrM37vKvM7NHEsru8+7z | last post by:
I lookup the utf-8 form of delta from the link. http://www.fileformat.info/info/unicode/char/0394/index.htm and then I want to print it in the python ( I work under windows) #!/usr/bin/python...
5
by: Moham12345 | last post by:
How can i detect if there is more then capital letter in a word?
1
by: mujunshan | last post by:
Yesterday, I installed PythonCE on my cellphone whose OS is Windows Mobile 5.I wanted to use numpy as calculation tool.But after I copy numpy module in my desktop computer into my phone,I find many...
4
by: zcabeli | last post by:
Hi all, i'm currently struggling to perform the above mentioned replacement. i already know how to catch the first letter in each word and determined if it's regular or capital. however, i...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.