Howto convert text to XML

Just starting out? Need help? Post your questions and find answers here.
karu
Posts: 40
Joined: Mon Feb 24, 2014 10:16 pm

Howto convert text to XML

Post by karu »

Can anyone help, i got through the websocket xml file in text format. Now if i want to parse XML, i need to convert this text value to SB XML. How to do this?

thanks
Karu
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Howto convert text to XML

Post by Peter »

you can do this with CatchXML().

Greetings ... Peter
karu
Posts: 40
Joined: Mon Feb 24, 2014 10:16 pm

Re: Howto convert text to XML

Post by karu »

Peter wrote:you can do this with CatchXML().

Greetings ... Peter
Thanks Peter, but with CatchXML() i get: ReferenceError: spider_CatchXML is not defined
Cool Dji
Posts: 11
Joined: Fri Mar 07, 2014 6:20 pm

Re: Howto convert text to XML

Post by Cool Dji »

Hello Karu,

Is your first need is to read a texte file with data (without the "openfile" function) ?

Do you try to do this with the xml file ?

If you want to work only with xml file, i can't help you...but if you want to read data with a file, i can help you : i write data on a .raw file, and i transform it (with photoshop) on a .bmp file
If you want, i can put a real example but at first here is the code to read data on a .bmp file...

Code: Select all

 StartDrawing(ImageOutput(0))
      ri(c,l)
      nbmapdalle = t
      StopDrawing()



Procedure ri(x.i,y.i)
   cl=Point(x,y)
   n0=Str(Red(cl))
   n1=Str(Green(cl))
   n2=Str(Blue(cl))
   sr=""
   w=Len(Bin(Val(n2)))
   If w<8
   For q=0 To 8-w-1
   sr=sr+"0"  
   Next
   EndIf
   si=Bin(Val(n1))+sr+Bin(Val(n2))
   t=Val("%"+si)
   If n0="1":t=-t:EndIf
   c+1
 EndProcedure

Post Reply