Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

XML Encoding Error

Posted on 2010-11-20
5
Medium Priority
?
683 Views
Last Modified: 2012-05-10
I have an XML file that will not load into Windows Explorer or into the intended destination application. The destination application gives very little information as to why the file fails. Internet Explorer stops (I think) at an error in the file with an ‘invalid character was found in text content’ message’.
The next character – the one that Explorer indicates is causing the problem – looks like a space. When I paste the text from the XML file into a website that converts text to SSCII it returns the space as a NULL.
When I try to load the file into an XML editor (Oxygen)  I get a ‘character coding exception’ error.
The XML file does not start with a XML Version element, with accompanying encoding attribute , and I cannot change the format, so I assume I must be stuck with the default encoding – whatever that is.
This file is an example of several that will not load. They are created using  the FileSystemObject WriteLine method within a VBA routine in Access 2010. How can I ensure that this produces text with the correct encoding?
0
Comment
Question by:LinksGu2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 8

Expert Comment

by:Den_HBR
ID: 34179589
Can you please upload the file?
0
 
LVL 40

Expert Comment

by:als315
ID: 34179744
XML is text file. Open it with any text editor and check encoding and structure.
0
 

Author Comment

by:LinksGu2
ID: 34180285
The file in question is a large one.here's a snippet.
Snippet-2.xml
0
 
LVL 40

Accepted Solution

by:
als315 earned 1000 total points
ID: 34182266
It seems problem is in 2 codes before ":" in this part:
CDATA[3E8S090K  : SILVER EARRING]
After K there are 2 hex A0 (Non-breaking space - &nbsp) symbols. If you replace them with hex 20 (space) all will be OK.
0
 
LVL 8

Expert Comment

by:Den_HBR
ID: 34182709
als315 is right.
You have to replace the Hex A0 with Hex 20  (= replace Dec 160 by Dec 32)

But to open it in internet explorer you will also have to add a parent element:
Something like <ProductList> on the very first line
and
something like </ProductList> on the very last line
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question