Skip to content
This repository has been archived by the owner on Jan 6, 2021. It is now read-only.
/ Xcri4j Public archive
forked from oucs0130/Xcri4j

Java Library for parsing XCRI documents

License

Notifications You must be signed in to change notification settings

ox-it/Xcri4j

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xcri4j

Archived

This project is no longer needed as a standalone project as it's codebase has been copied into the Sakai codebase.

A Java library for parsing and generating XCRI documents

http://www.xcri.org/wiki/index.php/XCRI_CAP_1.2

Features

  • Handles incorrect namespaces
  • Handles element names in the WRONG CaSe
  • Handles HTML in CDATA sections in descriptions, tries to convert to valid XHTML
  • Logs errors and tries to fix them rather than fail

Basic Usage

To parse an XML document and create a new Catalog object:

Catalog catalog = new Catalog();
SAXBuilder builder = new SAXBuilder();
Document document = builder.build(new File("src-test/test.xml"));
catalog.fromXml(document);

You can also output XCRI using JDOM:

new XMLOutputter().output(catalog.toXml(), out);

(For example, you can use XCRI4J as a preprocessor to attempt to clean up a feed)

NOTE

Note that this ISN'T FINISHED! Please fork it and add missing parts :-)

About

Java Library for parsing XCRI documents

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%