Re: [xml] Entity with elements inside it?



On Thu, Jul 9, 2009 at 7:08 PM, Michael Ludwig<mlu as-guides com> 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?

MiLu FLUNDER:~/win-dev/XML > cat nstoken.xml
<!DOCTYPE Urmel [
<!ENTITY jaja "<eins><zwei/><drei>drei</drei></eins>">
]>
<Urmel> &jaja; </Urmel>

MiLu FLUNDER:~/win-dev/XML > xmllint nstoken.xml
<?xml version="1.0"?>
<!DOCTYPE Urmel [
<!ENTITY jaja "<eins><zwei/><drei>drei</drei></eins>">
]>
<Urmel> &jaja; </Urmel>

MiLu 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]