By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,028 Members | 1,258 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,028 IT Pros & Developers. It's quick & easy.

cannot read xml file all of the sudden

P: n/a
Hi I am using
ms acces 2002 to read an xml file.
I am using the DOM object in ms access - version xml 4 with service pack 2.
here is the start of the code below. But I am having trouble reading in the
xml file. It seems to be well formed and I was even able to read an earlier
version of the file. This file is a result of being zipped. Could that be
the case? Maybe some invisible chars causing the problem.

How can I test this bit of code. I get no 'Product' nodes returned. Where
as before the file was traversed nicely. It seems the older and new file
were identical, but I cannot read the newer one. What can I do?
The header for both is:

<?xml version="1.0" encoding="UTF-8"?>

Dim test As DOMDocument
Dim nodelist As IXMLDOMNodeList
Dim anode As IXMLDOMNode
Set test = New DOMDocument
test.async = False
test.Load "c:\testxml.xml"

Set nodelist = test.getElementsByTagName("Product")

-------------

Thanks so much

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Mon, 09 May 2005 22:07:03 GMT, "Jill" <ji********@hotmail.com>
wrote:

Use a "file compare" utility to find the differences between the two
files. A cheap command line version is already on your machine: run a
command window, and type:
fc /?

-Tom.

Hi I am using
ms acces 2002 to read an xml file.
I am using the DOM object in ms access - version xml 4 with service pack 2.
here is the start of the code below. But I am having trouble reading in the
xml file. It seems to be well formed and I was even able to read an earlier
version of the file. This file is a result of being zipped. Could that be
the case? Maybe some invisible chars causing the problem.

How can I test this bit of code. I get no 'Product' nodes returned. Where
as before the file was traversed nicely. It seems the older and new file
were identical, but I cannot read the newer one. What can I do?
The header for both is:

<?xml version="1.0" encoding="UTF-8"?>

Dim test As DOMDocument
Dim nodelist As IXMLDOMNodeList
Dim anode As IXMLDOMNode
Set test = New DOMDocument
test.async = False
test.Load "c:\testxml.xml"

Set nodelist = test.getElementsByTagName("Product")

-------------

Thanks so much


Nov 13 '05 #2

P: n/a
"Jill" <ji********@hotmail.com> wrote in message
news:ba*************@newsread1.news.pas.earthlink. net...
Hi I am using
ms acces 2002 to read an xml file.
I am using the DOM object in ms access - version xml 4 with service pack 2.
here is the start of the code below. But I am having trouble reading in the
xml file. It seems to be well formed and I was even able to read an earlier
version of the file. This file is a result of being zipped. Could that be
the case? Maybe some invisible chars causing the problem.

How can I test this bit of code. I get no 'Product' nodes returned. Where as
before the file was traversed nicely. It seems the older and new file were
identical, but I cannot read the newer one. What can I do?
The header for both is:

<?xml version="1.0" encoding="UTF-8"?>

Dim test As DOMDocument
Dim nodelist As IXMLDOMNodeList
Dim anode As IXMLDOMNode
Set test = New DOMDocument
test.async = False
test.Load "c:\testxml.xml"

Set nodelist = test.getElementsByTagName("Product")

-------------

Thanks so much

Unless you specify the version it's possible you are not using version 4 parser:
Dim test As DOMDocument40
Set test = New DOMDocument40

You'll have to show at least some of the file. Does the latest version of the
file use namespaces whereas the previous ones didn't?

--

Joe (MVP - XML)

https://mvp.support.microsoft.com/pr...8-8741D22D17A5
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.