Alberts suggestion of XSLT is probably the way to go, but if you're just interested in a single class then you can throw the rest of your XML away, right? You just need to pick out the class you're interested in and then simply state out the attributes/elements for that node. If you then want the relationships you want to throw away everything that isn't "related" but it's not clear how that's defined in your schema (parent, ancestor nodes - or is there some attribute that holds the name of your node that you're looking for?).
If you know the class up front you should be able to do this in a single pass with any old XML reader (python, etc), if you're trying to use some criteria to find an interesting class in a document then you'd either need multiple passes (to test and then refine the throw away bit) or to build a bunch of indexes as you parse the doc, and then use those indexes to generate the UML
I would say, get something working first, then refine it for performance. Without further detail it is hard to suggest a more specific approach. Plantuml is ideally suited to this sort of thing, I would argue - but as XML schemas are so application specific, it's not going to be able to generate a diagram that does what you want unless you tell it what you want.
Finally, consider whether your schema can be converted to JSON (I think all XML will go to JSON, but you can't always go from JSON to XML). If so, you could convert it to JSON, then use macros in Plantuml to generate your diagrams.