from pymongo import MongoClient
Client = MongoClient()
myclient = MongoClient('localhost', 27017)
my_database = myclient["GFG"]
my_collection = my_database["Student"]
# number of documents in the collection
mydoc = my_collection.find().count()
print("The number of documents in collection : ", mydoc)
XNamespace aw = "http://www.adventure-works.com";
XElement root = new XElement(aw + "Root",
new XAttribute(XNamespace.Xmlns + "aw", "http://www.adventure-works.com"),
new XElement(aw + "Child", "child content")
);
Console.WriteLine(root);
<aw:Root xmlns:aw="http://www.adventure-works.com">
<aw:Child>child content</aw:Child>
</aw:Root>