Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Does grav support xml?

Started by Muut Archive 12 years ago · 1 replies · 648 views
12 years ago

We are using Framemaker > DITA to generate xml files. We would like to import these xml files to grav if it is compatible.

12 years ago

Grav supports XML output no problem. We use this in our sitemap and also feeds plugin.

However, I think you are looking to read and process XML files? Although this is not currently supported, it is probably something that could be done with a plugin.

Assuming your a developer, with some php experience, the process to test this would not be terribly difficult. Simple create a new folder for your page as you would for Grav, then take one your XML files and drop it in the folder, and rename it so teh extension is .md. I know this is not intuitive but Grav expects .md files only right now.

At this point you could write a simple plugin (see the many we have in the downloads for reference) perhaps using the onPageContentRaw() event, and then process the XML with SimpleXML methods to set the header/content etc. This will get automatically cached for performance.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Muut Archive, 10 years ago
1 672 1 week ago
Archive · by Deleted User, 9 years ago
0 3042 9 years ago
Archive · by Muut Archive, 9 years ago
2 1983 9 years ago
Archive · by Muut Archive, 9 years ago
2 5336 9 years ago
Archive · by Muut Archive, 9 years ago
1 4134 9 years ago