On Thu, Jul 9, 2009 at 7:08 PM, Michael Ludwig<[email protected]> wrote: > Bo Yang schrieb: > >> But, what I want is that keep the entity_ref node created and then >> append the entity content as a sub-dom-tree to the entity_ref. Is >> there anyway to do this with libxml2? > > Do I understand correctly that you want to both keep the entity > reference and expand it?
I want both. > Or do you simply want to expand it? > > m...@flunder:~/win-dev/XML > cat nstoken.xml > <!DOCTYPE Urmel [ > <!ENTITY jaja "<eins><zwei/><drei>drei</drei></eins>"> > ]> > <Urmel> &jaja; </Urmel> > > m...@flunder:~/win-dev/XML > xmllint nstoken.xml > <?xml version="1.0"?> > <!DOCTYPE Urmel [ > <!ENTITY jaja "<eins><zwei/><drei>drei</drei></eins>"> > ]> > <Urmel> &jaja; </Urmel> > > m...@flunder:~/win-dev/XML > xmllint --noent nstoken.xml > <?xml version="1.0"?> > <!DOCTYPE Urmel [ > <!ENTITY jaja "<eins><zwei/><drei>drei</drei></eins>"> > ]> > <Urmel> <eins><zwei/><drei>drei</drei></eins> </Urmel> The above is not my desired behavior. I want to the parser create a entity_ref node, and then append the parsed "jaja" to the children of entity_ref. Regards! Bo _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
