This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Microsoft XML > March 2004 > MSXML and Access VBA to Decode an XML Document?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
MSXML and Access VBA to Decode an XML Document?
|
|
| Jason Ferguson 2004-03-30, 10:14 pm |
| I am attempting to create VBA code within Access 2000 that will read a
PureEdge .xfdl form package and store the information within the
database (facilitate searching, recreate lost forms, etc).
PureEdge XFDL packages use standard encoding, something like this:
----
application/x-xfdl;content-encoding="asc-gzip"
EgjqYHic7V1Zc+JIEn6ejdj/oHA/THfEYHQjzbiZ4LKbXYx7DT1HvzhkELamhURIwn38+i1dgKpK
----
I have the newest version of MSXML 4.0 installed, but cannot figure
out the data members well enough to decode and display the XML
content. This function doesn't seem to work:
Public Function readfunction()
Dim xmlDoc As New MSXML.DOMDocument
xmlDoc.async = False
xmlDoc.resolveExternals = False
xmlDoc.Load ("D:\af1000.xfd")
If (xmlDoc.parseError.errorCode <> 0) Then
Dim myErr
Set myErr = xmlDoc.parseError
MsgBox ("You have error " & myErr.reason)
Else
MsgBox xmlDoc.xml
End If
Can anyone help me decode and display the XML involved?
| |
| Andy Fish 2004-03-30, 10:14 pm |
| of the top of my head, I think you need to say
Dim xmlDoc As New MSXML.DOMDocument40
if you want to use msxml version 4.
"Jason Ferguson" <fergusonjason@sbcglobal.net> wrote in message
news:61f03b70.0403282041.2bc24aad@posting.google.com...
> I am attempting to create VBA code within Access 2000 that will read a
> PureEdge .xfdl form package and store the information within the
> database (facilitate searching, recreate lost forms, etc).
>
> PureEdge XFDL packages use standard encoding, something like this:
>
> ----
> application/x-xfdl;content-encoding="asc-gzip"
>
EgjqYHic7V1Zc+JIEn6ejdj/oHA/THfEYHQjzbiZ4LKbXYx7DT1HvzhkELamhURIwn38+i1dgKpK
> ----
>
> I have the newest version of MSXML 4.0 installed, but cannot figure
> out the data members well enough to decode and display the XML
> content. This function doesn't seem to work:
>
> Public Function readfunction()
> Dim xmlDoc As New MSXML.DOMDocument
>
> xmlDoc.async = False
> xmlDoc.resolveExternals = False
> xmlDoc.Load ("D:\af1000.xfd")
>
> If (xmlDoc.parseError.errorCode <> 0) Then
>
> Dim myErr
> Set myErr = xmlDoc.parseError
> MsgBox ("You have error " & myErr.reason)
>
> Else
> MsgBox xmlDoc.xml
> End If
>
> Can anyone help me decode and display the XML involved?
| |
| Jason Ferguson 2004-03-30, 10:14 pm |
| Slight update to code, the previous paste was from the older MSXML
Library. However, I still cant decode the gzip/MIME that the file is
encoded into.
Public Function readfunction()
Dim xmlDoc As New MSXML2.DOMDocument40
xmlDoc.async = False
xmlDoc.resolveExternals = False
xmlDoc.Load ("D:\af1000.xfd")
If (xmlDoc.parseError.errorCode <> 0) Then
Dim myErr
Set myErr = xmlDoc.parseError
MsgBox ("You have error " & myErr.reason)
Else
MsgBox xmlDoc.xml
End If
fergusonjason@sbcglobal.net (Jason Ferguson) wrote in message news:<61f03b70.0403282041.2bc24aad@posting.google.com>...
> I am attempting to create VBA code within Access 2000 that will read a
> PureEdge .xfdl form package and store the information within the
> database (facilitate searching, recreate lost forms, etc).
>
> PureEdge XFDL packages use standard encoding, something like this:
>
> ----
> application/x-xfdl;content-encoding="asc-gzip"
> EgjqYHic7V1Zc+JIEn6ejdj/oHA/THfEYHQjzbiZ4LKbXYx7DT1HvzhkELamhURIwn38+i1dgKpK
> ----
>
> I have the newest version of MSXML 4.0 installed, but cannot figure
> out the data members well enough to decode and display the XML
> content. This function doesn't seem to work:
>
> Public Function readfunction()
> Dim xmlDoc As New MSXML.DOMDocument
>
> xmlDoc.async = False
> xmlDoc.resolveExternals = False
> xmlDoc.Load ("D:\af1000.xfd")
>
> If (xmlDoc.parseError.errorCode <> 0) Then
>
> Dim myErr
> Set myErr = xmlDoc.parseError
> MsgBox ("You have error " & myErr.reason)
>
> Else
> MsgBox xmlDoc.xml
> End If
>
> Can anyone help me decode and display the XML involved?
| |
| Jason Ferguson 2004-03-30, 10:15 pm |
| I fixed it. However, I still don't know how to go from the MIME and
gzip'd encoding to the actual XML inside.
Jason
"Andy Fish" <ajfish@blueyonder.co.uk> wrote in message news:<UNS9c.5826$jE5.3208@news-lhr.blueyonder.co.uk>...[color=darkred]
> of the top of my head, I think you need to say
>
> Dim xmlDoc As New MSXML.DOMDocument40
>
> if you want to use msxml version 4.
>
>
> "Jason Ferguson" <fergusonjason@sbcglobal.net> wrote in message
> news:61f03b70.0403282041.2bc24aad@posting.google.com...
> EgjqYHic7V1Zc+JIEn6ejdj/oHA/THfEYHQjzbiZ4LKbXYx7DT1HvzhkELamhURIwn38+i1dgKpK
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|