GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 

GenoPro Support Forum




Can you recommend a XML editor ?

Click to view RSS...
Author Some XML editors can create unexpected problems
Posted Friday, March 15, 2013 - Post #31468
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Customers
GenoPro version: 2.0.0.4

Last Login: Monday, August 28, 2023
Posts: 26, Visits: 135
I wanted to make some very simple modifications to dictionary I noticed there was a phrase editor, but it is a bit cryptic due to minimal
documentation. After a quick try using the rather primitive notepad I googled “xml editor” that suggested amongst other things MS XML
Notepad 2007. Easy to understand and use because it displays the xml code in a exploded view. Very easy to read and change where required.

I made the little change I wanted and all seemed well. That is until I noticed some changes in the report: some typos had appeared. Taking away the changes did not removed the typos. These typos are at specific places as can be seen in the following extracts: (I have put the occurrences in bold.  

..... John and Vivien were marriedin Devon. They have a son and a daughter, named DavidandAnnabel.
David was bornon July 10th, 1966in Devon.
Annabel was bornin Devon.
Isabella was bornin 1907. …. She died at the age of 100in 2007.
….... They had five daughters named Vivien, Mary, Susan, VickyandHelen.
This picture, 'MyPic-03', was takenon January 7th, 2000in Here.

The problem seems specific to the use of the following words: in, on, and. Some blank spaces disappear before or/and after such words. However the following is still correct:

Her paternal grandparents were Robert Steward Porter and Emily Frost.

I also noticed that in the “Ancestor pedigree chart” there was still the same kind of typo but spaces were some non standard blank space
character:

Robert Steward Porter  - b.27 Jun 1846in Holland d.06 Oct 1891in Dublin

which in url encoding reads (conversion with http://rishida.net/tools/conversion/): Robert%C2%A0Steward%C2%A0Porter%20%C2%A0-%C2%A0b.27%C2%A0Jun%C2%A01846in%C2%A0Holland%C2%A0d.06%C2%A0Oct%C2%A01891in%C2%A0Dublin
Also XML Notepad 2007 had made one unexpected change, adding the following line ahead of the code: <?xml version="1.0" encoding="utf-8"?>  However, editing out that first line in notepad does not cure the problem.

CoffeeCup Editor also add a head line <Dictionary Language="EN" Version="2012.08.30"> but leaves the code untouched. Fair to say that CoffeeCup, as regards xml code is not much more than a replica of notepad.

Xray XML Editor does not add any head line, but declares the line that CoffeCup added (see above) as illegal. It is much better than notepad and coffeeCup as it outlines with different colours the components of the code (not quite as good as XML Notepad 2007) but the big advantage is that it does not changes special characters, as XML Notepad 2007 does. It will do.

But has anyone a better XML Editor to suggest?

And why are there special (non printing) characters in the dictionary and should they be replaced?


Tags:
Posted Saturday, March 16, 2013 - Post #31469
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Customers
GenoPro version: 2.5.3.9

Last Login: Tuesday, August 20, 2019
Posts: 104, Visits: 1,686
Hi,
Although I am not too technically equipped, it reminds me of a problem I hit about 2 years ago. As you, I tried to make minor changes in the Dictionary.xml file. Can't remember which XML editor I used, but the symptoms were that spaces disappeared in the generated report. The diagnostic from Genome (Ron, the designer of the Narrative Reports) on this forum was (I quote): 


"But anyway I strongly suspect that your XML Editor is at fault. The Dictionary uses numeric entities such a &#32; to represent enforced spaces. Perhaps your editor is replacing these with ordinary spaces. Unfortunately these are then treated as 'white space' and stripped out when GenoPro reads the entry."


and further, upon looking at my Dictionary.xml:


"As I suspected and you have remarked on, your XML Editor appears to have replaced all &#32; entities with a space character. Other decimal numeric entities have been replaced by their hexadecimal equivalents."


The solution for me was to start all over again with a new, clean copy of the latest version of Dictionary.xml which you can extract from the latest zipped skin at "http://support.genopro.com/Attachment1433.ashx ("Latest GenoPro 2011 'Narrative Report' Skin") and to make my changes with Notepad (producing spaces in the standard way with the space bar). Be careful when you save your modified Dictionary.xml and use "Save as". If you are not careful, it will be saved as a *.txt file, totally useless for the Report Generator. To save when done, I systematically hit the upper right corner X exit box and double check that my file is saved under the right name and the right extension. That was also the time when I learned to make backups of all the files I opened prior to opening them. Since then, this method works well for me when I wish to make small cosmetic changes (such as font size or style, wording, etc.) to skin programs.
Hope this helps. Kind regards.
Roland
Posted Sunday, March 17, 2013 - Post #31476
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Customers
GenoPro version: 2.0.0.4

Last Login: Monday, August 28, 2023
Posts: 26, Visits: 135
Thanks for the information you have provided. I had a quick browse into dictionary.xml and there is an abundance of &#32 entities.

Such entities do not appear at all in "XML notepad 2007" except in a comment (not very useful and possibly misleading): it clearly means that there is a conversion to ordinary spaces. Which piece of software later clears the leading and trailings spaces from a text item is not yet clear to me yet but  I suspect vbs to be the culprit.

The best and simplest example I could find within dictionary.xml clarifies the whole thing.

    <And T="and"/>
    <ConjunctionAnd T="&#32;and&#32;" />

But why the first line except to remind to use the second (??)

As I said all XML editors do not behave in the same way. I have used ArchiTag XRay XML Editor which does not converts numeric entities to ordinary text whilst providing a much better display of XML code.

http://architag-xray-xml-editor.software.informer.com/ but download version 2.1 from CNET
http://download.cnet.com/XRay-XML-Editor/3000-7241_4-10166163.html

Philippe


Similar Topics

Click to view RSS...
Expand / Collapse

Reading This Topic

Expand / Collapse