0

I am creating a website that is meant to be a sort of user start guide with an introduction page, an overview page, and a page featuring the actual guide which will feature step-by-step instructions for the user to follow. Since I don't have the specific content for the page, I'm " hard coding" the HTML with placeholder text. Going forward, I want to create a skeleton HTML framework that will parse the start guide files JavaScript and display the information on the page in its expected place. I'm strongly considering using XML (or JSON) files and parsing it with JavaScript and using browser DOM methods because that's what I know. However, I'm working on a team of people who most likely won't know how to convert the start guides (which are PDFs) into well-formed XML so I'm wondering, are there any alternative ways to do this? I know Word has the ability to save documents as HTML and XML but they don't create the proper attributes/tags to be parsed with the JavaScript I'd write.

TLDR: Are there files or alternative methods other than JSON and XML (something that non-tech savvy people will understand) that can be parsed and processed with JavaScript to display in a skeleton website?

crin
  • 73
  • 1
  • 2
  • 13
  • 2
    Maybe you don't know this, but JavaScript can parse any file; it supports XML and JSON out of the box, anything else you need to write yourself. I think your question is unfortunately too vague to say anything further than that. –  Jun 14 '18 at 19:11
  • 1
    `XML` is not tech savvy if you have most basic knowledge of `HTML`. As @Amy said, your question is too vague. – Alex Jun 14 '18 at 19:16
  • This question has less to do with scaffolding a new site with some placeholder data, and far more to do with the unspecified guide conversion process. What are these guides? What information do they contain? What information are you trying to extract? How much data are we talking about? How is this data structured? Why are users doing this (ostensibly) by hand? –  Jun 14 '18 at 19:22
  • Thanks @Amy your quick response. I guess I figured there existed some sort of software or way that could make the unstructured .docx or PDF into something more structured like JSON or XML so it could be easily parsed but I guess not. The guides are PDFs with tables and code snippets so the unstructured format of the PDF, I think, would make it hard to properly structure in HTML. It would need to be done by hand because the PDF guides already exist; we are trying to move away from the PDF (that Linux users can't easily access) to local HTML files. – crin Jun 14 '18 at 19:26
  • @Alex I know XML is not tech-savvy at all but I was told to think of alternative methods. But XML seems like the simplest way to do this; just make some predefined nodes and have them copy-paste the necessary info into each node/subnode. – crin Jun 14 '18 at 19:29
  • 1
    @crin Well some software packages do exist but they probably aren't free. I have used Aspose to extract data from PDF and Word documents. How easily this can be done depends **entirely** on the source file. By that, I mean it is easier to pull out text from a named form field than it is to say "find the text around (35,178), bounded by the box (100,100), and OCR the text found in that region." (I use this to extract data from insurance applications automatically) –  Jun 14 '18 at 19:29
  • 1
    @crin Why don't you make a static Web UI that takes in inputs and then you construct the HTML as a string or array. This will let you control the flow and do things exactly by your criteria. – Alex Jun 14 '18 at 19:31
  • 1
    @Alex that's actually a really good idea actually, thank you. I'll create a basic "XML file generator" using a form; that way it'll be structured properly and I won't have to worry about the XML/HTML learning curve. – crin Jun 14 '18 at 19:38
  • _**Chaching**_ . Come back to us when you're done. – Alex Jun 14 '18 at 19:40
  • @Amy Ah, that sounds difficult since I don't know the format of all the source files- some guides might have images, graphs, etc. But I like the idea of named form fields so I'll be generating XML files based off of a form. I don't know how I'll handle graphs with XML but I'll cross that bridge when I come to it; thank you for the help/advice. – crin Jun 14 '18 at 19:45

0 Answers0