Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On 25/04/12 11:48, Noel Grandin wrote:
Looks like the code in
    unoxml/source/dom/saxbuilder.cxx
converts the SAX event stream into a DOM tree.

true, but irrelevant here because this is not used when calling
Reference< XDocument > SAL_CALL CDocumentBuilder::parse(const Reference<
XInputStream >& is)

On 2012-04-25 08:34, Christina Rossmanith wrote:
for the example without "x" and "y" attribute the "case XML_TEXT"
block is never reached. That's why I'd like to understand where and how
the tree is built.

fortunately Marco has already identified that the problem is in the
visitor, not the DOM construction (which would have surprised me);
with the way unoxml works there is no explicit DOM construction when
using the CDocumentBuilder, rather the parse() method calls a single
libmxl2 method that creates the entire DOM as a libxml2 xmlDoc; the
various CNode subclasses' instances wrap individual libxml2 xmlNodes and
are created only on demand, e.g. when you ask the CDocument for its
children the CElement instance for the root element is created, and it
will be deleted again when you release the uno::Reference while the
underlying libxml2 xmlNode survives as long as the entire document.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.