?
Solved

XML Encoding Error

Posted on 2010-11-20
5
Medium Priority
?
676 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

770 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