I am using Xerces-c in my project, and would like to create a single DOMElement without having to create a whole new DOMDocument. Is such a thing possible?
I am using Xerces-c in my project, and would like to create a single
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I haven’t seen a way. AFAIK the DOMDocument acts as the ‘memory pool’ and all elements are created in this pool. In the Xerces docs we see:
I’ve worked around this situation by keeping a scratch pad DOMDocument around and using it to create fragments or orphan nodes and adopting them into their destination documents when I’m ready. E.g.