Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Archive

Does grav support xml?

Started by Muut Archive 11 years ago · 1 replies · 367 views
11 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.

11 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 Deleted User, 9 years ago
0 1281 9 years ago
Archive · by Muut Archive, 9 years ago
2 888 9 years ago
Archive · by Muut Archive, 9 years ago
2 4018 9 years ago
Archive · by Muut Archive, 9 years ago
1 2894 9 years ago
Archive · by Muut Archive, 9 years ago
3 1077 9 years ago