Index: Source/Modules/xml.cxx
===================================================================
RCS file: /cvsroot/SWIG/Source/Modules/xml.cxx,v
retrieving revision 1.7
diff -u -r1.7 xml.cxx
--- Source/Modules/xml.cxx	11 Sep 2003 20:26:56 -0000	1.7
+++ Source/Modules/xml.cxx	30 Oct 2003 01:29:32 -0000
@@ -14,6 +14,7 @@
 static const char *usage = "\
 XML Options (available with -xml)\n\
      -xmllang <lang> - Typedef language\n\
+     -xmllite        - More lightweight version of XML\n\
      ------\n\
      deprecated (use -o): -xml <output.xml> - Use <output.xml> as output file (extension .xml mandatory)\n";
 
@@ -22,6 +23,8 @@
 
 //static Node *view_top = 0;
 static File *out = 0;
+static int xmllite = 0;
+
 
 class XML
 : public Language
@@ -79,6 +82,11 @@
 			{
 				fputs( usage, stderr );
 			}
+			if( strcmp( argv[iX], "-xmllite" ) == 0 )
+			{
+				Swig_mark_arg (iX);
+                                xmllite = 1;
+                        }
 		}
 
                 // Add a symbol to the parser for conditional compilation
@@ -93,6 +101,7 @@
 		{
 			String *outfile = Getattr(n,"outfile");
 			Replaceall(outfile,".cxx", ".xml");
+			Replaceall(outfile,".cpp", ".xml");
 			Replaceall(outfile,".c", ".xml");
 			out = NewFile(outfile,"w");
 			if (!out)
@@ -159,11 +168,11 @@
 			{
 				Xml_print_baselist( Getattr(obj,k) );
 			}
-			else if (Cmp(k,"typescope") == 0)
+			else if (!xmllite && Cmp(k,"typescope") == 0)
 			{
 				Xml_print_typescope( Getattr(obj,k) );
 			}
-			else if (Cmp(k,"typetab") == 0)
+			else if (!xmllite && Cmp(k,"typetab") == 0)
 			{
 				Xml_print_typetab( Getattr(obj,k) );
 			}
