programming a logging system

gelo

Member
Joined
Sep 24, 2007
Messages
13
Programming Experience
1-3
hello again, im back with a new problem but still on the same program. ill put the stuff again to make it a lil easier:

At this moment in time im trying to implement a logging system which will display messages to the user when it scans through data in a richtextbox.

what i want it to do is, when it scans through some data like this:

VB.NET:
<HEADER MAGIC="XMF" VERSION="919" />
<MESH NUMSUBMESH="2">
    <SUBMESH NUMVERTICES="212" NUMFACES="300" NUMLODSTEPS="0" NUMSPRINGS="0" NUMMORPHS="0" NUMTEXCOORDS="1" MATERIAL="0">
        <VERTEX NUMINFLUENCES="1" ID="0">
            <POS>-50.5199 -249.753 756.691</POS>
            <NORM>1.37333e-005 -1.06814e-005 -1</NORM>
            <COLOR>0 0 0</COLOR>
            <TEXCOORD>1 1</TEXCOORD>
            <INFLUENCE ID="16">1</INFLUENCE>
        </VERTEX>
        <VERTEX NUMINFLUENCES="2" ID="1">
            <POS>-50.5199 -229.754 756.691</POS>
            <NORM>9.15551e-006 -7.62958e-006 -1</NORM>
            <COLOR>0 0 0</COLOR>
            <TEXCOORD>1 0.8</TEXCOORD>
            <INFLUENCE ID="16">0.972457</INFLUENCE>
            <INFLUENCE ID="15">0.0275429</INFLUENCE>
        </VERTEX>
        <FACE VERTEXID="0 1 2" />
        <FACE VERTEXID="2 3 0" />
    </SUBMESH>
</MESH>
    <SUBMESH NUMVERTICES="212" NUMFACES="300" NUMLODSTEPS="0" NUMSPRINGS="0" NUMMORPHS="0" NUMTEXCOORDS="1" MATERIAL="1">
        <VERTEX NUMINFLUENCES="1" ID="0">
            <POS>-50.5199 -249.753 756.691</POS>
            <NORM>1.37333e-005 -1.06814e-005 -1</NORM>
            <COLOR>0 0 0</COLOR>
            <INFLUENCE ID="16">1</INFLUENCE>
        </VERTEX>
        <VERTEX NUMINFLUENCES="2" ID="1">
            <POS>-50.5199 -229.754 756.691</POS>
            <NORM>9.15551e-006 -7.62958e-006 -1</NORM>
            <COLOR>0 0 0</COLOR>
            <INFLUENCE ID="16">0.972457</INFLUENCE>
            <INFLUENCE ID="15">0.0275429</INFLUENCE>
        </VERTEX>
        <FACE VERTEXID="0 1 2" />
        <FACE VERTEXID="2 3 0" />
    </SUBMESH>
</MESH>

i want my program to tell me which submesh doesnt have the string <TEXCOORD in it. please note that there can be more than 2 submeshes that may not have this string so, the error message text must be added onto the previous message text in the richtextbox that the error messages appear in. (that last bit may confuse you)

anyone got any ideas on how i can do this?

if it helps ive allready programmed a system where it counts how many submeshes there are.

thanks! this site has helped me a lot in the past thats why i came back!
 
Last edited:
yeah, that thing you psoted is actually called XML, treating it like a string is perhaps oversimplifying the problem and making it hard for yourself.. If you read this in as xml, you could use Xpath to enumerate all the elements and see which ones lack the element you specify
 
the data is from an xmf file which is a custom for of xml geometry data. it is correct. thats why i am not using the xml system. if i change the data then it wont work with the other program that it is used in.
 
Back
Top