I think something like this is what you want:
writer.WriteStartElement("MyGuest");
writer.WriteAttributeString("Type","Adult");
writer.WriteAttributeString("Number","2");
writer.WriteEndElement();
writer.WriteStartElement("MyGuest");
writer.WriteAttributeString("Type","Child");
writer.WriteAttributeString("Age","12");
writer.WriteAttributeString("Number","2");
writer.WriteEndElement();
But generally it would be better to know more about your usecase. Are Child and Adult classes you want to serialize? Then I would propose you that the classes should implement IXmlSerializable. This forces the types to implement Read and WriteXml methods. In these methods you can put the logic and call them from outside. This gives you more loose coupling and also more flexibillity if you add new types. Then you dont have to change your "one-method-serialization" every time. You would only implement the new behaviour in the new class it belongs.
If you go this way, you could make also a abstract base class "Guest" that has the property "Number". In the base Read and WriteXml you would de/serialize just this property and you dont have to repeat yourself in every additional "guest type" like child or adult...