Page 1 of 1

xmllite.dll ... using xml parser in xp (ie7) and vista

Posted: Tue Oct 23, 2007 9:12 am
by bingo
xmllite.lib + xmllite.h
http://kyf.net/tmp/xmllite.zip

useful links
http://msdn.microsoft.com/msdnmag/issue ... spx?loc=de
http://www.tkachenko.com/blog/archives/000589.html
http://msdn2.microsoft.com/en-us/library/ms752837.aspx

first source ...

Code: Select all

Import "xmllite.lib"
CreateXmlReader(riid.l,ppvObject.l,pMalloc.l)
EndImport

Interface IXmlReader
SetInput(a)
GetProperty(a,b)
SetProperty(a,b)
Read(a)
GetNodeType(a)
MoveToFirstAttribute()
MoveToNextAttribute()
MoveToAttributeByName(a,b)
MoveToElement()
GetQualifiedName(a,b)
GetNamespaceUri(a,b)
GetLocalName(a,b)
GetPrefix(a,b)
GetValue(a,b)
ReadValueChunk(a,b,c)
GetBaseUri(a,b)
IsDefault()
IsEmptyElement()
GetLineNumber(a)
GetLinePosition(a)
GetAttributeCount(a)
GetDepth(a)
IsEOF()
EndInterface

Structure STATSTG  
pwcsName.l 
type.l 
cbSize.q 
mtime.FILETIME 
ctime.FILETIME 
atime.FILETIME 
grfMode.f 
grfLocksSupported.l 
clsid.GUID 
grfStateBits.l 
reserved.l 
EndStructure

#STGM_READ = 0
#STGM_WRITE = 1
#STGM_READWRITE = 2

#STATFLAG_NONAME=0

#DtdProcessing_Prohibit = 0

#XmlReaderProperty_MultiLanguage	= 0
#XmlReaderProperty_ConformanceLevel	= #XmlReaderProperty_MultiLanguage + 1
#XmlReaderProperty_RandomAccess	= #XmlReaderProperty_ConformanceLevel + 1
#XmlReaderProperty_XmlResolver	= #XmlReaderProperty_RandomAccess + 1
#XmlReaderProperty_DtdProcessing	= #XmlReaderProperty_XmlResolver + 1

pFileStream.IStream
reader.IXmlReader


Debug SHCreateStreamOnFile_("c:\any.xml",#STGM_READ,@pFileStream)

pFileStream\Stat(st.STATSTG,#STATFLAG_NONAME)

Debug st\cbSize ; size ok !

Debug CreateXmlReader(?IID_IXmlReader,@reader,0)

Debug reader\SetProperty(#XmlReaderProperty_DtdProcessing,#DtdProcessing_Prohibit)

Debug reader\setinput(pFileStream) ; <- invalid memory access

DataSection 
IID_IXmlReader: 
Data.l $7279FC81
Data.w $709D,$4095
Data.b $B6,$3D,$69,$FE,$4B,$0D,$90,$30
EndDataSection 

End
:cry:

is the interface correct ?

Posted: Thu Oct 25, 2007 1:21 pm
by bingo