on 06-30-2011 4:00 PM - last edited on 02-04-2024 5:05 AM by postmig_api_4
Hi
I notice that if a xml (element having xmlns), and each time you assign, append or replace the child element you will always get xmlns in your child. For ex
<a xmlns="http://www.w3.org/1999/xhtml">
<b/>
</a>
new element:
<c> test </c>
Appending <c> test </c> to </b > in A (<b>) will result
<a xmlns="http://www.w3.org/1999/xhtml">
<b>
<c xmlns=""> test </c>
</b>
</a>
Why does the element <c xmlns=""> test </c> having xmlns?? Could it be a bug of MII ?
Edited by: Seng Kiang Hoe on Jun 30, 2011 5:00 PM
You are trying to insert a node of xml inside other xml node which is using namespace http://www.w3.org/1999/xhtml.
Node C is not containing the same namespace.
if the parse will not add xmlns="" then it will use the namespace as a node which is not correct.
it your c node will also using the same namespace as
<c xmlns="http://www.w3.org/1999/xhtml"> test </c>
then you will find output
<a xmlns="http://www.w3.org/1999/xhtml">
<b>
<c> test </c>
</b>
</a>
Thanks
Anshul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
7 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.