XML: Add a xmlRemove function to detach and remove elements from their parents 80/5380/10
Calixte DENIZET [Wed, 9 Nov 2011 23:09:21 +0000 (00:09 +0100)]
Change-Id: I6a19fc1662bf145525fb050aae27186dd5ab927a

18 files changed:
scilab/modules/xml/Makefile.am
scilab/modules/xml/Makefile.in
scilab/modules/xml/help/en_US/xmlRemove.xml [new file with mode: 0644]
scilab/modules/xml/includes/gw_xml.h
scilab/modules/xml/sci_gateway/c/gw_xml.c
scilab/modules/xml/sci_gateway/cpp/sci_xmlRemove.cpp [new file with mode: 0644]
scilab/modules/xml/sci_gateway/xml_gateway.xml
scilab/modules/xml/src/cpp/XMLDocument.cpp
scilab/modules/xml/src/cpp/XMLElement.cpp
scilab/modules/xml/src/cpp/XMLElement.hxx
scilab/modules/xml/src/cpp/XMLList.hxx
scilab/modules/xml/src/cpp/XMLNodeList.cpp
scilab/modules/xml/src/cpp/XMLNodeList.hxx
scilab/modules/xml/src/cpp/XMLNodeSet.cpp
scilab/modules/xml/src/cpp/XMLNodeSet.hxx
scilab/modules/xml/src/cpp/XMLRemovable.hxx [new file with mode: 0644]
scilab/modules/xml/xml.vcxproj
scilab/modules/xml/xml.vcxproj.filters

index e9ef2b1..7d33170 100644 (file)
@@ -78,7 +78,8 @@ GATEWAY_CPP_SOURCES = sci_gateway/cpp/sci_xmlRead.cpp \
                      sci_gateway/cpp/sci_xmlValidate.cpp \
                      sci_gateway/cpp/sci_xmlIsValidObject.cpp \
                      sci_gateway/cpp/sci_xmlAsNumber.cpp \
-                     sci_gateway/cpp/sci_xmlAsText.cpp
+                     sci_gateway/cpp/sci_xmlAsText.cpp \
+                     sci_gateway/cpp/sci_xmlRemove.cpp
 
 libscixml_la_CFLAGS= -I$(srcdir)/includes/ \
                     -I$(top_srcdir)/libs/MALLOC/includes/ \
index c0f7b4b..89fbb53 100644 (file)
@@ -158,7 +158,8 @@ am__objects_5 = libscixml_la-sci_xmlRead.lo \
        libscixml_la-sci_xmlValidationFile.lo \
        libscixml_la-sci_xmlValidate.lo \
        libscixml_la-sci_xmlIsValidObject.lo \
-       libscixml_la-sci_xmlAsNumber.lo libscixml_la-sci_xmlAsText.lo
+       libscixml_la-sci_xmlAsNumber.lo libscixml_la-sci_xmlAsText.lo \
+       libscixml_la-sci_xmlRemove.lo
 am_libscixml_la_OBJECTS = $(am__objects_4) $(am__objects_5)
 libscixml_la_OBJECTS = $(am_libscixml_la_OBJECTS)
 libscixml_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
@@ -566,7 +567,8 @@ GATEWAY_CPP_SOURCES = sci_gateway/cpp/sci_xmlRead.cpp \
                      sci_gateway/cpp/sci_xmlValidate.cpp \
                      sci_gateway/cpp/sci_xmlIsValidObject.cpp \
                      sci_gateway/cpp/sci_xmlAsNumber.cpp \
-                     sci_gateway/cpp/sci_xmlAsText.cpp
+                     sci_gateway/cpp/sci_xmlAsText.cpp \
+                     sci_gateway/cpp/sci_xmlRemove.cpp
 
 libscixml_la_CFLAGS = -I$(srcdir)/includes/ \
                     -I$(top_srcdir)/libs/MALLOC/includes/ \
@@ -733,6 +735,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscixml_la-sci_xmlNs.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscixml_la-sci_xmlRead.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscixml_la-sci_xmlReadStr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscixml_la-sci_xmlRemove.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscixml_la-sci_xmlValidate.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscixml_la-sci_xmlValidationFile.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscixml_la-sci_xmlWrite.Plo@am__quote@
@@ -1116,6 +1119,13 @@ libscixml_la-sci_xmlAsText.lo: sci_gateway/cpp/sci_xmlAsText.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscixml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscixml_la-sci_xmlAsText.lo `test -f 'sci_gateway/cpp/sci_xmlAsText.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_xmlAsText.cpp
 
+libscixml_la-sci_xmlRemove.lo: sci_gateway/cpp/sci_xmlRemove.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscixml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscixml_la-sci_xmlRemove.lo -MD -MP -MF $(DEPDIR)/libscixml_la-sci_xmlRemove.Tpo -c -o libscixml_la-sci_xmlRemove.lo `test -f 'sci_gateway/cpp/sci_xmlRemove.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_xmlRemove.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscixml_la-sci_xmlRemove.Tpo $(DEPDIR)/libscixml_la-sci_xmlRemove.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_xmlRemove.cpp' object='libscixml_la-sci_xmlRemove.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscixml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscixml_la-sci_xmlRemove.lo `test -f 'sci_gateway/cpp/sci_xmlRemove.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_xmlRemove.cpp
+
 mostlyclean-libtool:
        -rm -f *.lo
 
diff --git a/scilab/modules/xml/help/en_US/xmlRemove.xml b/scilab/modules/xml/help/en_US/xmlRemove.xml
new file mode 100644 (file)
index 0000000..e4f0905
--- /dev/null
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2011 - DIGITEO - Calixte DENIZET
+*
+* This file must be used under the terms of the CeCILL.
+* This source file is licensed as described in the file COPYING, which
+* you should have received as part of this distribution.  The terms
+* are also available at
+* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+*
+-->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="xmlRemove" xml:lang="en">
+  <info>
+    <pubdate>$LastChangedDate$</pubdate>
+  </info>
+  <refnamediv>
+    <refname>xmlRemove</refname>
+    <refpurpose>Remove an element or a list of elements from their parents</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <title>Calling Sequence</title>
+    <synopsis>
+      xmlRemove(elems)
+    </synopsis>
+  </refsynopsisdiv>
+  <refsection>
+    <title>Arguments</title>
+    <variablelist>
+      <varlistentry>
+        <term>elems</term>
+        <listitem>
+          <para>elems, an XMLElem or a XMLSet (result of XPath query) or a XMLlist (a children list)</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsection>
+  <refsection>
+    <title>Description</title>
+    <para>Detach one or several elements from their parents. The detached elements are definitly lost.</para>
+  </refsection>
+  <refsection>
+    <title>Examples</title>
+    <programlisting role="example"><![CDATA[
+    doc = xmlReadStr("<root><a>Hello</a><b>Scilab</b><a>World</a></root>");
+
+    // Remove all the <a>
+    xp = xmlXPath(doc, "//a");
+    xmlRemove(xp);
+    xmlDump(doc)
+    xmlClose(doc);
+
+    // Remove the first element
+    doc = xmlReadStr("<root><a>Hello</a><b>Scilab</b><a>World</a></root>");
+    xmlRemove(doc.root.children(1));
+    xmlDump(doc)
+
+    //Remove all the root children
+    xmlRemove(doc.root.children);
+    xmlDump(doc)
+
+    xmlClose(doc);
+    ]]></programlisting>
+  </refsection>
+  <refsection role="see also">
+    <title>See Also</title>
+    <simplelist type="inline">
+      <member>
+        <link linkend="XMLObjects">XMLObjects</link>
+      </member>
+    </simplelist>
+  </refsection>
+  <refsection>
+    <title>Author</title>
+    <para>Calixte DENIZET</para>
+  </refsection>
+  <refsection>
+    <title>History</title>
+    <revhistory>
+      <revision>
+        <revnumber>5.4.0</revnumber>
+        <revremark>XML module introduced.</revremark>
+      </revision>
+    </revhistory>
+  </refsection>
+</refentry>
index 315191c..3b26a5a 100644 (file)
@@ -69,6 +69,7 @@ int sci_percent_XMLValid_p(char *fname, unsigned long fname_len);
 int sci_xmlIsValidObject(char *fname, unsigned long fname_len);
 int sci_xmlAsNumber(char *fname, unsigned long fname_len);
 int sci_xmlAsText(char *fname, unsigned long fname_len);
+int sci_xmlRemove(char *fname, unsigned long fname_len);
 /*--------------------------------------------------------------------------*/
 #endif /* __GW_XML_H__ */
 /*--------------------------------------------------------------------------*/
index fcb9f51..40aa7a1 100644 (file)
@@ -95,7 +95,8 @@ static gw_generic_table Tab[] =
     {sci_percent_XMLValid_p, "%XMLValid_p"},
     {sci_xmlIsValidObject, "xmlIsValidObject"},
     {sci_xmlAsNumber, "xmlAsNumber"},
-    {sci_xmlAsText, "xmlAsText"}
+    {sci_xmlAsText, "xmlAsText"},
+    {sci_xmlRemove, "xmlRemove"}
 };
 /*--------------------------------------------------------------------------*/
 int gw_xml(void)
diff --git a/scilab/modules/xml/sci_gateway/cpp/sci_xmlRemove.cpp b/scilab/modules/xml/sci_gateway/cpp/sci_xmlRemove.cpp
new file mode 100644 (file)
index 0000000..0443191
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - DIGITEO - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "XMLObject.hxx"
+#include "XMLRemovable.hxx"
+
+extern "C"
+{
+#include "xml.h"
+#include "gw_xml.h"
+#include "stack-c.h"
+#include "Scierror.h"
+#include "api_scilab.h"
+#include "xml_mlist.h"
+#include "localization.h"
+}
+
+using namespace org_modules_xml;
+
+/*--------------------------------------------------------------------------*/
+int sci_xmlRemove(char * fname, unsigned long fname_len)
+{
+    XMLRemovable * rem;
+    SciErr err;
+    int id;
+    int * addr = 0;
+
+    CheckLhs(1, 1);
+    CheckRhs(1, 1);
+
+    err = getVarAddressFromPosition(pvApiCtx, 1, &addr);
+    if (err.iErr)
+    {
+        printError(&err, 0);
+        return 0;
+    }
+
+    if (!isXMLElem(addr, pvApiCtx) && !isXMLList(addr, pvApiCtx) && !isXMLSet(addr, pvApiCtx))
+    {
+        Scierror(999, gettext("%s: Wrong type for input argument #%d: A XMLElem or a XMLList or a XMLSet expected.\n"), fname, 1);
+        return 0;
+    }
+
+    id = getXMLObjectId(addr, pvApiCtx);
+    rem = dynamic_cast<XMLRemovable *>(XMLObject::getFromId<XMLObject>(id));
+    if (!rem)
+    {
+        Scierror(999, gettext("%s: XML object does not exist.\n"), fname);
+        return 0;
+    }
+
+    rem->remove();
+
+    LhsVar(1) = 0;
+    PutLhsVar();
+
+    return 0;
+}
+/*--------------------------------------------------------------------------*/
index d80f2b8..01cbb67 100644 (file)
 <PRIMITIVE gatewayId="68" primitiveId="74" primitiveName="xmlIsValidObject" />
 <PRIMITIVE gatewayId="68" primitiveId="75" primitiveName="xmlAsNumber" />
 <PRIMITIVE gatewayId="68" primitiveId="76" primitiveName="xmlAsText" />
+<PRIMITIVE gatewayId="68" primitiveId="77" primitiveName="xmlRemove" />
 </GATEWAY>
index b1989d6..54fce6a 100644 (file)
@@ -143,11 +143,13 @@ namespace org_modules_xml
         xmlXPathCompExpr * expr = xmlXPathCtxtCompile(ctxt, (const xmlChar *)query);
         if (!expr)
         {
+            xmlSetStructuredErrorFunc(ctxt, 0);
             *error = *errorXPathBuffer;
             return 0;
         }
 
         xmlXPathObject * xpath = xmlXPathCompiledEval(expr, ctxt);
+        xmlSetStructuredErrorFunc(ctxt, 0);
         if (!xpath)
         {
             *error = *errorXPathBuffer;
@@ -273,7 +275,7 @@ namespace org_modules_xml
     xmlDoc * XMLDocument::readDocument(const char * filename, bool validate, std::string * error)
     {
         xmlParserCtxt * ctxt = initContext(error, validate);
-        xmlDoc * doc;
+        xmlDoc * doc = 0;
         int options = XML_PARSE_NSCLEAN;
 
         if (validate)
@@ -283,6 +285,7 @@ namespace org_modules_xml
 
         if (!ctxt)
         {
+            xmlSetGenericErrorFunc(ctxt, 0);
             return 0;
         }
 
@@ -301,7 +304,7 @@ namespace org_modules_xml
     xmlDoc * XMLDocument::readDocument(const std::string & xmlCode, bool validate, std::string * error)
     {
         xmlParserCtxt * ctxt = initContext(error, validate);
-        xmlDoc * doc;
+        xmlDoc * doc = 0;
         int options = XML_PARSE_NSCLEAN;
 
         if (validate)
@@ -311,6 +314,7 @@ namespace org_modules_xml
 
         if (!ctxt)
         {
+            xmlSetGenericErrorFunc(ctxt, 0);
             return 0;
         }
 
index 92671e8..7b8af0c 100644 (file)
@@ -52,6 +52,12 @@ namespace org_modules_xml
         return static_cast<void *>(node);
     }
 
+    void XMLElement::remove() const
+    {
+        xmlUnlinkNode(node);
+        xmlFreeNode(node);
+    }
+
     const XMLObject * XMLElement::getXMLObjectParent() const
     {
         return &doc;
index 33724a2..d3d30fe 100644 (file)
@@ -14,6 +14,7 @@
 #define __XMLELEMENT_HXX__
 
 #include <string>
+#include "XMLRemovable.hxx"
 
 #include "xml.h"
 
@@ -32,7 +33,7 @@ namespace org_modules_xml
      * Class to wrap a xmlNode
      * @see http://xmlsoft.org/html/libxml-tree.html#xmlNode
      */
-    class XMLElement : public XMLObject
+    class XMLElement : public XMLObject, public XMLRemovable
     {
         xmlNode * node;
         const XMLDocument & doc;
@@ -55,6 +56,8 @@ namespace org_modules_xml
 
         void * getRealXMLPointer() const;
 
+        void remove() const;
+
         /**
          * @return the node name
          */
index 1297b80..caade45 100644 (file)
@@ -14,6 +14,7 @@
 #define __XMLLIST_HXX__
 
 #include <string>
+#include "XMLRemovable.hxx"
 
 #include "xml.h"
 
@@ -27,7 +28,7 @@ namespace org_modules_xml
      *
      * Virtual class to handle a list of XMLObjects
      */
-    class XMLList : public XMLObject
+    class XMLList : public XMLObject, public XMLRemovable
     {
 
     public :
index 8e580e1..67943cf 100644 (file)
@@ -54,6 +54,18 @@ namespace org_modules_xml
         return list;
     }
 
+    void XMLNodeList::remove() const
+    {
+        xmlNode * cur = parent->children;
+
+        while (cur)
+        {
+            xmlUnlinkNode(cur);
+            xmlFreeNode(cur);
+            cur = parent->children;
+        }
+    }
+
     const XMLObject * XMLNodeList::getXMLObjectParent() const
     {
         return &doc;
@@ -106,6 +118,7 @@ namespace org_modules_xml
                     parent->children = 0;
                 }
                 prevNode = parent->children;
+                scope->registerPointers(parent->children, this);
                 prev = 1;
             }
             else
index 43377e0..62b5fc4 100644 (file)
@@ -50,6 +50,8 @@ namespace org_modules_xml
 
         const char ** getContentFromList() const;
 
+        void remove() const;
+
         /**
          * Removes an element
          * @param index the index of the element to remove
index a303604..1d7d40a 100644 (file)
@@ -62,6 +62,16 @@ namespace org_modules_xml
         return list;
     }
 
+    void XMLNodeSet::remove() const
+    {
+        for (int i = 0; i < size; i++)
+        {
+            xmlNode * node = nodeSet->nodeTab[i];
+            xmlUnlinkNode(node);
+            xmlFreeNode(node);
+        }
+    }
+
     const XMLObject * XMLNodeSet::getXMLObjectParent() const
     {
         return &doc;
index 796f27e..5fe3613 100644 (file)
@@ -48,6 +48,8 @@ namespace org_modules_xml
 
         const char ** getContentFromList() const;
 
+        void remove() const;
+
         const XMLObject * getXMLObjectParent() const;
         const XMLObject * getListElement(int index);
     };
diff --git a/scilab/modules/xml/src/cpp/XMLRemovable.hxx b/scilab/modules/xml/src/cpp/XMLRemovable.hxx
new file mode 100644 (file)
index 0000000..f74a7f2
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - DIGITEO - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#ifndef __XMLREMOVABLE_HXX__
+#define __XMLREMOVABLE_HXX__
+
+namespace org_modules_xml
+{
+    /**
+     * @file
+     * @author Calixte DENIZET <calixte.denizet@scilab.org>
+     *
+     * Pure virtual class for XMLElement and XMLList
+     */
+    class XMLRemovable
+    {
+
+    public:
+
+        /**
+         * Remove this object or this list of objects from the document
+         */
+        virtual void remove() const = 0;
+    };
+}
+
+#endif
index e879069..634ead8 100644 (file)
   <ItemGroup>
     <ClInclude Include="src\cpp\extraction.hpp" />
     <ClInclude Include="src\cpp\insertion.hpp" />
+    <ClInclude Include="src\cpp\SplitString.hxx" />
     <ClInclude Include="src\cpp\VariableScope.hxx" />
     <ClInclude Include="src\cpp\XMLAttr.hxx" />
     <ClInclude Include="src\cpp\XMLDocument.hxx" />
     <ClInclude Include="src\cpp\XMLNotHandledElement.hxx" />
     <ClInclude Include="src\cpp\XMLNs.hxx" />
     <ClInclude Include="src\cpp\XMLObject.hxx" />
+    <ClInclude Include="src\cpp\XMLRemovable.hxx" />
     <ClInclude Include="src\cpp\XMLRhsValue.hxx" />
+    <ClInclude Include="src\cpp\XMLValidation.hxx" />
+    <ClInclude Include="src\cpp\XMLValidationDTD.hxx" />
+    <ClInclude Include="src\cpp\XMLValidationRelaxNG.hxx" />
+    <ClInclude Include="src\cpp\XMLValidationSchema.hxx" />
     <ClInclude Include="src\cpp\XMLXPath.hxx" />
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="sci_gateway\cpp\sci_xmlNs.cpp" />
     <ClCompile Include="sci_gateway\cpp\sci_xmlRead.cpp" />
     <ClCompile Include="sci_gateway\cpp\sci_xmlReadStr.cpp" />
+    <ClCompile Include="sci_gateway\cpp\sci_xmlRemove.cpp" />
     <ClCompile Include="sci_gateway\cpp\sci_xmlValidate.cpp" />
     <ClCompile Include="sci_gateway\cpp\sci_xmlValidationFile.cpp" />
     <ClCompile Include="sci_gateway\cpp\sci_xmlWrite.cpp" />
index c231d2e..2a49c00 100644 (file)
     <ClInclude Include="src\cpp\XMLRhsValue.hxx">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="src\cpp\SplitString.hxx">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="src\cpp\XMLRemovable.hxx">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="src\cpp\XMLValidation.hxx">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="src\cpp\XMLValidationDTD.hxx">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="src\cpp\XMLValidationRelaxNG.hxx">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="src\cpp\XMLValidationSchema.hxx">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="src\cpp\VariableScope.cpp">
     <ClCompile Include="sci_gateway\cpp\sci_xmlAsText.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="sci_gateway\cpp\sci_xmlRemove.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
 </Project>
\ No newline at end of file