You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Arnaud Le Hors <le...@us.ibm.com> on 2001/01/20 02:07:57 UTC
Re: how to quickly find an element (by attribute) in a DOM? any hints
appeciated
Using an ID attribute is the way to go. But to be valid an ID must start
with a letter.
Don't ask me why, this is yet another annoying heritage from SGML...
But simply change id='1' to something like id='id-1' and everything will
be fine.
Well, actually your DTD has a problem too, the element event is declared
twice...
--
Arnaud Le Hors - IBM Cupertino, XML Strategy Group
XalanText::substringData() BUG?
Posted by Lyle Coder <x_...@hotmail.com>.
I'm seeing that if the XalanText node contains no data, calling
substringData(0, 1024) causes a seg fault (actually any number for the max
size)
Is this a bug or is the semantics to always check for the node to contain
data? Incidentally getData() does not crash
Thanks
Lyle
deleting a XalanNode
Posted by Lyle Coder <x_...@hotmail.com>.
Hi,
I have a function called xalan_free which walks the XalanDom in post order
freeing at the end of the walk like this:
void xalan_free(XalanNode *node)
{
if(node->hasChildren())
xalan_free(node->getFirstChild());
if (node->getNextSibling())
xalan_free(node->getNextSibling());
if (node->getNodeType() != XalanNode::DOCUMENT_NODE)
node->getParentNode()->removeChild(node);
delete node;
}
problem is I get a seg fault at the delete... can some one tell me what I'm
doing wrong?
Thanks
Lyle