Nп/п : 25 из 37
 От   : Larry Serflaten                     2:5075/128        07 сен 23 07:08:24
 К    : Accu Backup                                           07 сен 23 17:10:01
 Тема : Re: Anyone know how read XML?
----------------------------------------------------------------------------------
                                                                                 
@MSGID:
<81cb9ea2-c7f2-4992-8e54-ec14400c4f50n@googlegroups.com> 4baa7f89
@REPLY:
<0ed148e3-cded-4d85-bea5-8979e98d771dn@googlegroups.com> 19a55017
@REPLYADDR Larry Serflaten <serflaten@gmail.com>
@REPLYTO 2:5075/128 Larry Serflaten
@CHRS: CP866 2
@RFC: 1 0
@RFC-References:
<0c640188-cdf2-421e-aca2-583457644423n@googlegroups.com> <d0dfac9e-d413-490b-a595-fb2fcde550aan@googlegroups.com>
<24c250df-8e59-4af9-b5bf-d17f6a92a6e4n@googlegroups.com> <20230414171132.00006d23@mvps.org.invalid>
<5cf1be47-7a74-42fa-b012-9e0c167ae58en@googlegroups.com> <1c082c0f-fad1-4a99-834b-22db0cc3c815n@googlegroups.com>
<20230822174909.00004e84@mvps.org.invalid> <d8705cd6-a647-4f5c-92e7-4746e79a5448n@googlegroups.com>
<20230825113749.00003ea6@mvps.org.invalid> <20230825113913.000017cb@mvps.org.invalid>
<877e2be8-725d-4849-9c7c-4ea2adc83303n@googlegroups.com> 1@paganini.bofh.team>
<6aa51ffe-f4a3-46a4-a793-f971c42d26f5n@googlegroups.com> 1@paganini.bofh.team>
<bde707de-6b62-41b9-b198-a25c135762d2n@googlegroups.com> 1@paganini.bofh.team>
<f4046b66-7001-40fe-8667-a246c4403dcdn@googlegroups.com> <oFKdncM5N4x9eGz5nZ2dnZfqn_idnZ2d@giganews.com>
<965cbf88-2aa7-42ea-962c-42f6c42544a9n@googlegroups.com> <694abf6d-9e11-41a8-a663-73c407c901cen@googlegroups.com>
<eccd921a-8b64-46fe-a2ce-2aed142df6abn@googlegroups.com> <73996481-2fb5-4a82-ab1a-809f6391d471n@googlegroups.com>
<0ed148e3-cded-4d85-bea5-8979e98d771dn@googlegroups.com>
@RFC-Message-ID:
<81cb9ea2-c7f2-4992-8e54-ec14400c4f50n@googlegroups.com>
@TZUTC: -0700
@PID: G2/1.0
@TID: FIDOGATE-5.12-ge4e8b94
Accu Backup wrote:

> Thank you, Larry, for those examples!

 You`re welcome! What is missing from that last example is how to
get from the byte data back to the text strings. Just for completeness,
here is the full demo:

Private Sub Command1_Click()
Dim data() As Byte
Dim find() As Byte
Dim size As Long
Dim pos As Long
Dim text As String


data = StrConv("Now is the time for all", vbFromUnicode)
find = StrConv("time", vbFromUnicode)
size = UBound(find) - LBound(find) + 1

` locate position
pos = InStrB(1, data, find, vbBinaryCompare)

` extract text
text = StrConv(MidB$(data, pos, size), vbUnicode)

` show values
Debug.Print size, pos, text

Good luck!
LFS
--- G2/1.0
 * Origin: usenet.network (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх