Click here to Skip to main content
13,771,662 members
Rate this:
Please Sign up or sign in to vote.
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:
<pos>51.6886 2.03197 1011.29
<norm>0.727597 0.395241 -0.560703
<color>0 0 0
<texcoord>0.231275 0.813344
<FACE VERTEXID="662 827 825" />
<FACE VERTEXID="662 825 828" />
<FACE VERTEXID="646 662 828" />
Posted 10-Nov-17 11:40am
Updated 11-Nov-17 21:52pm
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 Bangalore 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

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

<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 -->
                <face vertexid="662 827 825" />
                <face vertexid="662 825 828" />
                <face vertexid="646 662 828" />
              </submesh><!-- No matching opening tag -->

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?

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web05 | 2.8.181119.1 | Last Updated 12 Nov 2017
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100