I am using XMLWriter to create an XML output of my MySQL Database, and I would like to know how I could prevent this happening <hello></hello> by doing this <hello>nil</hello>
So basically replace “” with “nil”.
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.
<hello></hello>is proper for indicating an empty node in XML; the other way is<hello />. Replacing withnilmeans it’s no longer an empty node; it’s a node with the text contentnil.If you do that replacement, you’re changing the meaning of the data in the XML. This is a terrible idea.