Searching a string is broken?

I'm building a driver that communicate with machines using a socket. I get the data from those machines in XML formats ...
The Data is received in chunks, so I kinda have to wait until I receive all the parts of the XML, then parse it when I have it all.
Everytime I receive a chunk, I try to search for the following string </ORU_R31> using this method: receivedMessage.find("</ORU_R31>")
but it's always returning the position of <ORU_R31> and NOT </ORU_R31> (that's without the forward slash).

I can not use an XML parser at this stage as my XML message is not ready and I wana keep it lightweight...
Anyone came across this problem before? I even tried using escape characters, but no luck...
Can you post the implementation of the find method? To me it looks like thats the only place where the error can be, maybe it handles slash caracters in a special way. If you do not have access to the sourcecode of the find method you should be able to find something in the documentation of that method.
Last edited on
Topic archived. No new replies allowed.