Help in libxml++ for Linux

Hi,

Using libxml++-2.6, is it possible to change the xsi:noNamespaceSchemaLocation in the root element node?
e.g.
from

<myxml xsi:noNamespaceSchemaLocation="ABC.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   :
   :
</myxml>

to

<myxml xsi:noNamespaceSchemaLocation="XYZ.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   :
   :
</myxml>

I tried to set the attribute value after getting the attribute pointer from the node element as follows:

Element* nodeElement = dynamic_cast<const Element*>(rootNode)
Attribute* attribute = nodeElement->get_attribute("xsi:noNamespaceSchemaLocation")
if (attribute)
     attribute->set_value("XYZ.xsd:);
else
     cout << "Attribute NOT found" << endl;

The output shows "Attribute NOT found" :confused:

I am not familiar with libxml++ but am very familiar with libxml. It looks like you are using the wrong method to access the namespace nodes as far as libxml is concerned.

I understand that libxml++ is simply a C++ wrapper around libxml. I glanced at the libxml++ API documentation and as far as I can see libxml++ does not provide wrappers for the libxml namespace APIs. I could be wrong - I only spent a few minutes looking for namespace manipulation methods. You should examine the limxml++ documentation yourself carefully.