troubleshooting Question

Using Open XML to edit Unicode XML files

Avatar of Hardi
Hardi asked on
Delphi
12 Comments1 Solution618 ViewsLast Modified:
I need help from someone who has used Open XML to read and write Unicode XML files, with Delphi 7.

I just installed Open XML (http://www.philo.de/xml/)
and TntWare (http://www.tntware.com/delphicontrols/unicode/)
to read, edit, and save XML files.
However I am not sure how to use these components for working with Unicode strings.

Could someone give me a sample working code to use those 2 components to do the following:
- Read an XML file (the encoding can be anything, mostly UTF-8 though)
- Display some value (can be non-ASCII) in a TntEdit (I would probably use a stringgrid later, but I think TntEdit is the simplest for just an example). This value can then be edited.
- Save the XML without changing the encoding, updating the value that has been edited

Let's say I expect the XML to be in this format:
<?xml version="1.0" encoding="......." ?>
<blah>
   <item name="....." description="....." />
</blah>

I want to be able to edit the value of description, where it may contain any character (eg. Chinese or anything)

Thanks a lot!
ASKER CERTIFIED SOLUTION
flasht

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 12 Comments.
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>

Mike

Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 12 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004