• Welcome to Jose's Read Only Forum 2023.
 

Don Dickinsons XML Lib ... comments

Started by Theo Gottwald, August 15, 2013, 07:41:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Theo Gottwald

Today i tried Don Dickinsons XML Lib, as its for me easier to use then the other MSXML-Examples.
The Link to Don's actual site is this:

Don Dickinsons Site

It still contains a lot of useful stuff.
One of these is his

XML-Parser v. 1.2

Which is either buggy or not properly documented.

Here is a small example:

<Patch PatchName="q265258.exe" SQNumber="Q265258">
<DL SFN="Q265258_IE51_SP1_x86_ENU.exe" FS="351512">
  <SURLS>
   <SURL LGROUP="ENSTD" LURL="http://download.microsoft.com/download/ie501sp1/secpach8/5.01_SP1/WIN98/EN-US/q265258.exe"/>
  </SURLS>
  <AffectedProductSPs/>
</DL>
</Patch>



This will not work but bring an error. See attached picture.
Just adding a "Space" (CHR$(32)) before the "\" here:

<Patch PatchName="q265258.exe" SQNumber="Q265258">
<DL SFN="Q265258_IE51_SP1_x86_ENU.exe" FS="351512">
  <SURLS>
   <SURL LGROUP="ENSTD" LURL="http://download.microsoft.com/download/ie501sp1/secpach8/5.01_SP1/WIN98/EN-US/q265258.exe"/>
  </SURLS>
  <AffectedProductSPs />
</DL>
</Patch>


Is the only thing that needs to be changed to make it work. While the comments do not say that this space is needed.

'  internal_xmlReadAttributes                                     NOT EXPORTED
'  Takes everything after the tag specifier - <TAGNAME and
'  extracts the attributes of the tag. Sets iFoundEnd to
'  %True if this tag was self terminating ( <TAGNAME/> ) and
'  we won't find an end tag.


I'll take a look into the code and see if it can easily be fixed.

Theo Gottwald

Ok, i have made this change:

(Before:)


            '- The end of the tag
                     CASE %XML_END_TAG
                        GOSUB parseXML2_AddTag   



(After)
               '- The end of the tag
                     ' Changed!!
                     CASE %XML_END_TAG
                        IF lastChar=%XML_SELF_TERMINATE THEN iSelfTerminate = %true
                        GOSUB parseXML2_AddTag   

Theo Gottwald

#2
Personally I'd say there is currently no working version of this library for PB 10.
Whatever is there may need a lot of changes.
We'll see if Don will take the time and make them.
The good news is that Don is alive and available.