KoXmlReader, this is bug or not
mojtaba shahi Senobari
mojtaba.shahi3000 at gmail.com
Thu Aug 2 14:24:28 BST 2012
I dont know, where is the problem in KoXmlReader i have just tested if you
like this is my test :
if (!odfStore->open("meta.xml")) {
kDebug(30517) << "Cannot open meta.xml";
delete odfStore;
return KoFilter::FileNotFound;
}
KoXmlDocument doc;
QString errorMsg;
int errorLine, errorColumn;
if (!doc.setContent(odfStore->device(), true, &errorMsg, &errorLine,
&errorColumn)) {
kDebug() << "Error occured while parsing meta.xml "
<< errorMsg << " in Line: " << errorLine
<< " Column: " << errorColumn;
return KoFilter::ParsingError;
}
KoXmlNode childNode = doc.documentElement();
childNode = childNode.firstChild();
if (childNode.isText())
kDebug() <<" Node is Text";
if (childNode.isElement())
kDebug() << " Node is Element";
/////////////
The result is "Node is Text". but i think the result should be Tag "meta"
chiled of node "document-meta" .
On Thu, Aug 2, 2012 at 5:45 PM, Boudewijn Rempt <boud at valdyas.org> wrote:
> Hm, I doubt there is a bug there, really. It's really old code that's been
> really well tested. I'm not sure I understand what you describe, though.
> Could you show the code you're talking about?
>
>
> On Thu, 2 Aug 2012, mojtaba shahi Senobari wrote:
>
> 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.
>>
>> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120802/ecc71c0d/attachment.htm>
More information about the calligra-devel
mailing list