XML, XSL, and UML

Hi,

I am a complete newbie to XML parsing. I have some questions and hope this forum can provide me some answers. I did browse through some websites but didnt help. My questions might be very simple and stupid, but I am thoroughly confused. Okay here is my situation:

i have a huge huge XML file that contains information about UML class diagram. Now how does having an XSL file help. I mean what purpose does it serve Do I have to have XSL file to read XML file

If I need to have XSL file, can anyone point me to a place where I can get XSL file for UML Is it same as UML metamodel

Thanks a million,



Answer this question

XML, XSL, and UML

  • Solmyr

    Hi,

    thank you so much for the clarification. it makes some sense. I was confusing between XSL and XSD, I guess. Now my next question is: is it possible to create an XSD file from XML file. I read a posting where it said I just need to open the XML file in an XML editor and there would be some option to create an XSD file based on that. I downloaded one editor, Oxygen, but couldnt figure out how to do so. I am certainly missing out something. Could you guys fill me in

    Thanks again


  • Learner006

    // My questions might be very simple and stupid, but I am thoroughly confused

    *grin* we were all 'thoroughly confused' once, that's why we like helping people who are in the same trouble we used to be...

    // i have a huge huge XML file that contains information about UML class diagram. Now how does having an XSL file help. I mean what purpose does it serve Do I have to have XSL file to read XML file

    An XSL file actually changes the format of your XML. That is, it takes an XML document, and spits out something that may or may not be XML ( it could be any sort of text ). So, XSL is used to change the format of XML, commonly to take a document that conforms to one schema, and turn it into HTML for viewing, or XML that conforms to another schema, for moving between systems.

    No, you have no use for the XSL, unless you want to change the XML. The XMLDataDocument class is what you need to load and examine your XML. XPath is the language you'd use to look through your XML.

    // If I need to have XSL file, can anyone point me to a place where I can get XSL file for UML Is it same as UML metamodel

    It's possible you need an XSL file if you want to pass the XML to some program that expects it in a different format to the format it's in. Where did the XML come from, and what do you want to do with it

    The other file format you'll see is XSD. An XSD is a schema, you pass an XML through an XSD and if it fails, then it's not formed in the manner you were hoping. But, you don't *need* any of these things to work with an XML file.

    http://www.w3schools.com/xpath/default.asp

    is a link to a good XPath tutorial, on what I think is the best site for XML information.



  • Jocker23

    XmlEditor in VS 2005 has schema inference. Look for "Create Schema" button in the toolbar.

    To read XML file you don't need XSD either. It doesn't help you reading the file, it will be useful if you want validate your XML.

    To read XML file you can create XmlReader or load it to XmlDocument. (not XMLDataDocument, but this is a different story.)



  • XML, XSL, and UML