Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey my understanding of XML is pretty much non-existent. I am trying to fix it so I am able to open it in Autodesk3DMax and edit the mesh. I keep getting the error 'Error at line 2, column 1: junk after document element'. If anyone could help me fix the code, or explain to me as simply as possible what is wrong I would be really grateful.

What I have tried:

The code is:
<MESH NUMSUBMESH="1"><SUBMESH NUMVERTICES="829" NUMFACES="859" NUMLODSTEPS="0" NUMSPRINGS="0" NUMMORPHS="0" NUMTEXCOORDS="1" MATERIAL="-2">
<VERTEX NUMINFLUENCES="1" ID="0">
<pos>51.6886 2.03197 1011.29
<norm>0.727597 0.395241 -0.560703
<color>0 0 0
<texcoord>0.231275 0.813344
<INFLUENCE ID="22">1
....
<FACE VERTEXID="662 827 825" />
<FACE VERTEXID="662 825 828" />
<FACE VERTEXID="646 662 828" />
</SUBMESH>
</MESH>
Posted
Updated 11-Nov-17 20:52pm
v3
Comments
Graeme_Grant 10-Nov-17 18:05pm    
Looking at the XML above, you are missing closing tags.
Member 13514809 10-Nov-17 19:11pm    
What are the closing tags <MESH NUMSUBMESH="1" />?
Karthik_Mahalingam 10-Nov-17 21:38pm    
use  Reply   button to post comments/query to the concerned user, so that the user gets notified and respond to your text.
Dave Kreskowiak 10-Nov-17 19:27pm    
Unless you know the XML format for 3DMax, we have no idea what it's considering "junk".

1 solution

XML
<mesh numsubmesh="1">
  <submesh numvertices="829" numfaces="859" numlodsteps="0" numsprings="0" nummorphs="0" numtexcoords="1" material="-2">
    <vertex numinfluences="1" id="0"><!-- No matching closing tag -->
      <pos><!-- No matching closing tag -->
        51.6886 2.03197 1011.29
        <norm><!-- No matching closing tag -->
          0.727597 0.395241 -0.560703
          <color><!-- No matching closing tag -->
            0 0 0
            <texcoord><!-- No matching closing tag -->
              0.231275 0.813344
              <influence id="22"><!-- No matching closing tag -->
                1
                ....
                <face vertexid="662 827 825" />
                <face vertexid="662 825 828" />
                <face vertexid="646 662 828" />
              </submesh><!-- No matching opening tag -->
</mesh>

Looking at your XML nicly formatted always can help. Using a XML viewer tool even better...
You XML is full of problems of formatting - the question where it come from?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900