I don't know how to say... The XIB is using xml to store the UIElement information, similar to .Net GUI. Is there any open source stuff also convert the xml file to a html layout?

closed as not a real question by Oded, yannis, Jonas, Karl Bielefeldt, ChrisF Dec 21 '11 at 20:57

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What rules would you use to convert an XML file? – Oded Dec 21 '11 at 13:39
  • 11
    Look into XSLT to transform your XML into HTML. – Bernard Dec 21 '11 at 13:41
  • If you want to use Interface Builder for web development, take a look at Cappuccino. – rightfold Dec 21 '11 at 13:49
  • You mention XIB which I take to stand for the output of Apple's Interface Builder. Is your actual question about creating HTML pages with that application? – Eric Dec 21 '11 at 13:51
  • 3
    @ted wong: Are you specifically asking how to use XIB files to create HTML layouts, or are you asking about a general purpose XML to HTML converter? You need to clarify what you are asking both in the question and the subject. – Bryan Oakley Dec 21 '11 at 14:03

Look at XSLT - its main use it to transform one XML dialect to another (in this case, you would output to HTML/XHTML).


Since the OP believes this is not a popular option, here is a link to the standard on the W3 consortium website.

  • It seems that it is not so popular, right? – Ted Wong Dec 21 '11 at 13:42
  • @TedWong - I don't know what you mean? XSLT is widely used. – Oded Dec 21 '11 at 13:43
  • 3
    @TedWong It is actually a web standard developed by the W3C. I can't imagine any other good answer to your question. – Eric Dec 21 '11 at 13:45
  • 1
    I see, maybe I not so familiar with it. – Ted Wong Dec 21 '11 at 13:45
  • Maybe he's looking for a particular XLST transformation (that is possibly embedded into a tool) to convert XIB into a developer-friendly display? I have no idea what XIB is other than it is a declarative GUI format (like XAML?). – Angelo Dec 21 '11 at 13:53

Since there is no way for a general purpose tool to know how to translate arbitrary XML into HTML, you will have to either do some coding or write some translation rules of some sort.

As mentioned in another answer, XSLT is more-or-less the standard tool for this job. Another option is to use a SAX parser to parse your XML using a familiar language, which you can use to translate each tag to the appropriate HTML tag. Many modern languages come with a SAX parser built in, so you may be able to do this with a language you are already familiar with.

Not the answer you're looking for? Browse other questions tagged or ask your own question.