hi,

thanks for the suggestions!

am Donnerstag 01 September 2011 (12:24) schrieb Thomas Friedrichsmeier:
> On Saturday 27 August 2011, meik michalke wrote:
> > and non-empty tags without value or children turn into empty tags, i need
> > to preserve that type info someway.

i fixed that one in the meantime, <tag></tag> doesn't become <tag /> any more. 
it was rather trivial, i just add an empty value (""). so i guess only the 
mixed text/tags issue is left.

> 1) You could treat text fragments as a sort of "pseudo" node

yes, i do -- at least i think i do ;-) it just doesn't really work yet, but i 
didn't look into that in detail. it probably is only an issue of how this 
pseudo node is designed, i might have done that too sloppy (cause it was of no 
practical relevance to me yet).

> Perhaps you'd keep one list of true child elements, and one list of all
> child fragments, where fragments can either be plain character, or a tag
> representation.

the problem is to decide what is a true child and what only a fragment. it's 
probably the easiest, most transparent solution to make everything a child 
node. there are different types already, like empty tags, dtd or xml 
declarations. in theory this should work.

> 2) The text representation could simply strip all child tags. See e.g. 
> http://doc.qt.nokia.com/4.6/qdomelement.html#text . Certainly not ideal,
> but  it could be a start.

at least it wouldn't break the parsing any more. if i can't get the above idea 
to work i'll maybe think of this as a temporary workaround. in the end, of 
course, a document should be functionally equal to the original after it was 
parsed and pasted back again.

> > compared to the XML package this one's really primitve, i don't know if
> > it's meant for CRAN?
> 
> Well, given that there are installation problems with the XML package, I
> could  certainly imagine there is a demand for a simple XML package, which
> may not cover everything, but "just works".

hm, ok ;-) when i'm convinced it really just works, i'll put it up on CRAN.


viele grüße :: m.eik

-- 
dipl. psych. meik michalke
institut f"ur experimentelle psychologie
abt. f"ur diagnostik und differentielle psychologie
heinrich-heine-universit"at d-40204 d"usseldorf

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
RKWard-devel mailing list
RKWard-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-devel

Reply via email to