XML conversion colon appears as _003A_

Questions about XML that are not covered by the other forums should go here.
hlpoindexter
Posts: 2
Joined: Tue Apr 29, 2008 4:23 pm

XML conversion colon appears as _003A_

Post by hlpoindexter »

Help. I am a new user and certainly not familiar with this process but I am willing to learn and understand. I need help as soon as possible.

I have an XML file (created using Access) that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="passing.xsd" generated="2008-04-29T08:25:27">
<nysp_x003A_Candidate>
<nc_x003A_PersonSurName>SMITH</nc_x003A_PersonSurName>
<nc_x003A_PersonGivenName>JULIE</nc_x003A_PersonGivenName>
<nc_x003A_PersonMiddleName>K</nc_x003A_PersonMiddleName>
<nc_x003A_IdentificationID>111111111</nc_x003A_IdentificationID>
<nc_x003A_PersonSexText>M</nc_x003A_PersonSexText>
<nc_x003A_PersonRaceText>2</nc_x003A_PersonRaceText>
<nc_x003A_PersonEducationLevelText>07</nc_x003A_PersonEducationLevelText>
<nc_x003A_AssessmentScoreText>97.64</nc_x003A_AssessmentScoreText>
</TEST_x003A_Candidate>

The problem is that when I create the XML file the _003A_ should be a colon and not Unicode conversion. Can anyone help me get the colon back?

The file is very extensive (there are over 16,000 names and a find/replace in notepad proved impossible to resolve).

Thank you so much.

Heather
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: XML conversion colon appears as _003A_

Post by sorin_ristache »

Hello,

You can do the find/replace in Oxygen. Open the file in Oxygen, press Ctrl+F, enter the find and replace expressions and press the Replace All button. It should work quite fast for large documents because it applies all the replace operations in one batch and the file content is refreshed in the Oxygen editor only at the end of the replace operation.

The better solution is to export the file correctly from Access, that is with proper namespace declarations:

Code: Select all

<dataroot xmlns:od="urn:schemas-microsoft-com:officedata" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="passing.xsd"
xmlns:nc="YourNamespaceHere"
generated="2008-04-29T08:25:27">
<nysp:Candidate>
<nc:PersonSurName>SMITH</nc:PersonSurName>
<nc:PersonGivenName>JULIE</nc:PersonGivenName>
<nc:PersonMiddleName>K</nc:PersonMiddleName>
...
Please note that I added xmlns:nc="YourNamespaceHere" which should be added by the Access export feature.


Regards,
Sorin
hlpoindexter
Posts: 2
Joined: Tue Apr 29, 2008 4:23 pm

Re: XML conversion colon appears as _003A_

Post by hlpoindexter »

Phew. I was afraid I was going to have to recompile all of my data.

Entering the proper names to begin with would be terrific except my client must have them this way. I have explained the problem to them but this is how their DB is set up. I had to work around their naming structure.

Thank you so much! The process seems to be running well. I tried to do the exact same thing in notepad...it ran for almost 10 hours and didn't even get 1/4 complete.

Heather
Post Reply