Click here to Skip to main content
15,885,214 members
Articles / Desktop Programming / MFC

A simple XML Parser

Rate me:
Please Sign up or sign in to vote.
4.69/5 (13 votes)
28 Jan 2002CPOL 361.4K   5.8K   70  
A class to read and write non validated XML files
<?xml version="1.0" encoding="utf-8" ?>
<X3D>
  <Header>
    <meta content="ExampleD_6Authored.xml" name="filename"/>
    <meta content="24 May 2000" name="revised"/>
    <meta content="VRML 97 specification example" name="description"/>
    <meta content="http://www.web3D.org/TaskGroups/x3d/translation/examplesVrml97Specification/ExampleD_6Authored.xml" name="url"/>
    <meta content="X3D-Edit, http://www.web3D.org/TaskGroups/x3d/translation/README.X3D-Edit.html" name="generator"/>
  </Header>
  <Scene>
    <Shape>
      <geometry>
        <IndexedFaceSet coordIndex="0, 1, 3, -1, 0, 2, 3, -1">
          <coord>
            <Coordinate point="0 0 0, 1 0 0, 1 0 -1, 0.5 1 0"/>
          </coord>
          <color>
            <Color color="0.2 0.7 0.8, 0.5 0 0, 0.1 0.8 0.1, 0 0 0.7"/>
          </color>
          <normal>
            <Normal vector="0 0 1, 0 0 1, 0 0 1, 0 0 1"/>
          </normal>
          <texCoord>
            <TextureCoordinate point="0 0, 1 0, 1 0.4, 1 1"/>
          </texCoord>
        </IndexedFaceSet>
      </geometry>
      <appearance>
        <Appearance>
          <material>
            <Material transparency="0.5"/>
          </material>
          <texture>
            <PixelTexture image="2 2 1 0xFF 0x80 0x80 0xFF"/>
          </texture>
        </Appearance>
      </appearance>
    </Shape>
  </Scene>
</X3D>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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


Written By
Retired
United States United States
Began programming in 1968 on a Wang 720. Move to Fortran and began developing FEM (finite element model) applications on an IBM 360 in 1973. Developed custom FEM editors for most of my career until 1995.

Comments and Discussions