Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,28 +141,4 @@ public void write(XmlWriterRequest<Model> request) throws XmlWriterException {
throw new XmlWriterException("Unable to write model: " + getMessage(e), getLocation(e), e);
}
}

/**
* Simply parse the given xml string.
*
* @param xml the input XML string
* @return the parsed object
* @throws XmlReaderException if an error occurs during the parsing
* @see #toXmlString(Object)
*/
public static Model fromXml(@Nonnull String xml) throws XmlReaderException {
return new DefaultModelXmlFactory().fromXmlString(xml);
}

/**
* Simply converts the given content to an XML string.
*
* @param content the object to convert
* @return the XML string representation
* @throws XmlWriterException if an error occurs during the transformation
* @see #fromXmlString(String)
*/
public static String toXml(@Nonnull Model content) throws XmlWriterException {
return new DefaultModelXmlFactory().toXmlString(content);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,28 +100,4 @@ public void write(XmlWriterRequest<PluginDescriptor> request) throws XmlWriterEx
throw new XmlWriterException("Unable to write plugin: " + getMessage(e), getLocation(e), e);
}
}

/**
* Simply parse the given xml string.
*
* @param xml the input XML string
* @return the parsed object
* @throws XmlReaderException if an error occurs during the parsing
* @see #toXmlString(Object)
*/
public static PluginDescriptor fromXml(@Nonnull String xml) throws XmlReaderException {
return new DefaultPluginXmlFactory().fromXmlString(xml);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this actively in use?


/**
* Simply converts the given content to an XML string.
*
* @param content the object to convert
* @return the XML string representation
* @throws XmlWriterException if an error occurs during the transformation
* @see #fromXmlString(String)
*/
public static String toXml(@Nonnull PluginDescriptor content) throws XmlWriterException {
return new DefaultPluginXmlFactory().toXmlString(content);
}
}