public class XmlReader extends Object implements ContentReader
<node>
<name>the name of the node</name>
<primaryNodeType>type</primaryNodeType>
<mixinNodeTypes>
<mixinNodeType>mixtype1</mixinNodeType>
<mixinNodeType>mixtype2</mixinNodeType>
</mixingNodeTypes>
<properties>
<property>
<name>propName</name>
<value>propValue</value>
or
<values>
<value/> for multi value properties
</values>
<type>propType</type>
</property>
<!-- more properties -->
</properties>
<nodes>
<!-- child nodes -->
<node>
..
</node>
</nodes>
</node>
If you want to include a binary file in your loaded content, you may specify it using a
<nt:file> element.| Modifier and Type | Class and Description |
|---|---|
protected static class |
XmlReader.AttributeMap
Utility class for dealing with attributes from KXmlParser.
|
protected static class |
XmlReader.FileDescription
Represents a reference to a file that is to be loaded into the repository.
|
protected static class |
XmlReader.NodeDescription |
protected static class |
XmlReader.PropertyDescription |
| Modifier and Type | Field and Description |
|---|---|
static ImportProvider |
PROVIDER |
| Modifier and Type | Method and Description |
|---|---|
void |
parse(InputStream ins,
ContentCreator creator)
Read the content from the input stream and create the
content using the provided content creator.
|
void |
parse(URL url,
ContentCreator creator)
Read the content from the URL and create the
content using the provided content creator.
|
public static final ImportProvider PROVIDER
public void parse(URL url, ContentCreator creator) throws IOException, javax.jcr.RepositoryException
ContentReaderparse in interface ContentReaderurl - The input stream.IOExceptionjavax.jcr.RepositoryExceptionContentReader.parse(URL, org.apache.sling.jcr.contentloader.internal.ContentCreator)public void parse(InputStream ins, ContentCreator creator) throws IOException, javax.jcr.RepositoryException
ContentReaderparse in interface ContentReaderins - the input stream.IOExceptionjavax.jcr.RepositoryExceptionCopyright © 2007–2014 The Apache Software Foundation. All rights reserved.