MongoDB insert \u0000 after each character in string field? -


i started mongodb , facing issue when saving xml in string field. add '\u0000' each character in xml file.

"\u0000?\u0000x\u0000m\u0000l\u0000 \u0000v\u0000e\u0000r\u0000s\u0000i\u0000o\u0000n

i need save xml without json 0r bson conversion in string field.

till time, found query xml in correct format.

db.test.find({"data":"xyz"}).foreach(function(doc){          var xml = doc.data.replace(/\u0000/g,"");          print(xml); }) 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -