Xmlns = ""

Source: Internet
Author: User

Using dom4j to combine the elements in the two hands, dom4j will write xmlns = "" on the added elements. At that time, I did not care about it. Later, the user asked me to remove it, it is not that easy to check. In the past, XML itself had very strict namespace management. If the namespace of the two elements is different, and the latter has no namespace, that is, the default value is "". once added, it will be explicitly written out and cannot be changed. I understand it. However, the customer does not agree, mainly because it does not look good and has to be changed,

Root. addelement (child) -->
Root. addelement (***. parsetext ('<tmproot xmlns = "rootsnamespace">' + child. asxml () + '</tmproot> '). getrootelement. element ('child ')))

 

.

Xmlns = ""

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.