Hello, thanks for your reply... I've been playing with it, and since I am also new to XML, I think I don't understand what it going on.
QDomText newNode
= doc.
createTextNode("New Text");
t = n.parentNode();
QDomNode oldNode
= t.
replaceChild(newNode, n
);
QDomText newNode = doc.createTextNode("New Text");
t = n.parentNode();
QDomNode oldNode = t.replaceChild(newNode, n);
To copy to clipboard, switch view to plain text mode
What happens is that it replaces the node with only
"New Text", which can be seen below.
<Row ss:Height="13.5" ss:AutoFitHeight="0">
- <Cell ss:StyleID="s38">
<Data ss:Type="String">Number of Quadrants</Data>
</Cell>
New Text //See? Not really a node, I don't think.
- <Cell ss:StyleID="s40">
<Data ss:Type="Number">14</Data>
</Cell>
</Row>
<Row ss:Height="13.5" ss:AutoFitHeight="0">
- <Cell ss:StyleID="s38">
<Data ss:Type="String">Number of Quadrants</Data>
</Cell>
New Text //See? Not really a node, I don't think.
- <Cell ss:StyleID="s40">
<Data ss:Type="Number">14</Data>
</Cell>
</Row>
To copy to clipboard, switch view to plain text mode
So, the replace works, my problem is that my node looks only like text..... as I said, I am new to XML...thanks!
How can I make a node that looks like this:
<Data ss:Type="String">New Text</Data>
Bookmarks