KoXmlReader, this is bug or not

Elvis Stansvik elvstone at gmail.com
Thu Aug 2 17:38:30 BST 2012


2012/8/2 mojtaba shahi Senobari <mojtaba.shahi3000 at gmail.com>:
> Hi all
>
> I was working with KoXmlReader and  at a node ( just include attributes ) i
> try firstChild().
>
> I except an element, that should be a child of my node, but no result.

Perhaps what you're looking for is firstChildElement() ? I think in
DOM, a node can by any type of node (element node, attribute node,
text node et.c.), and the first child node happens to be an attribute
node in your case.

I think firstChildElement will give you the first child element node.

Elvis

>
> I checked and  found that the result of firstChild is a KoXmlText.
>
> I think in this method (firstChild) programmer has not ignored  attributes
> of node.
>
> and this is for method KoXmlReader::nextSibling().
>
> Am i right and it is a bug or no, i am doing some thing wrong ?
>
> moji
>
> _______________________________________________
> calligra-devel mailing list
> calligra-devel at kde.org
> https://mail.kde.org/mailman/listinfo/calligra-devel
>



More information about the calligra-devel mailing list