Quite some misunderstandings here.
For tables use HTML tables. Some people on the web will discourage the use of tables. This comes from times where people abused them for page layout. There's no reason for not using tables for tables! If you really want to display a table in the classic sense, use the tags table, tr and td.
CSS is for styling first, it can be used for layout too. But it definately is not for defining tables of data.
Back to the actual question.
Do not save XML in MySQL. XML is a data storage format. Storing your raw data in the database is way cleaner, more flexible, extendible, more maintainable... you get the idea. Do you really need XML anyways? If so, use a marshalling library instead to transform between PHP, XML and Database. For XML there's DTD and XSD, two standard formats of defining how a valid XML document has to look like. Either will enable you to do quick validation and transformation.
Check all user inputs for right format, type, special characters, encoding and against your business logic. Define first what the user is expected to insert. You can validate the inputs on the client side for instant response, but you still have to validate them on the server before using or saving them. Client-side validation does not replace server-side validation! This is unrelated to any further working with that inputs. The validation is a mandatory pre-requisite.
Stick to these basic rules and you should be halfway over the hill. For further potential pitfalls we'd need to know your exact use case.
html_entities()on user input when you display it.