[opencms-dev] ver. 6 a 3 -- How can I get the output in xml
Eric C. Hein
eric.hein at sbcglobal.net
Fri Jan 28 18:02:27 CET 2005
Daniel,
Use a resource collector (I_CmsResourceCollector) to get the list of the
CmsResource objects:
// Get the data objects
I_CmsResourceCollector collector = (I_CmsResourceCollector)
OpenCms.getResourceManager().getContentCollector(collectorName);
List collectorResult = collector.getResults(cmsObject, collectorName, param,
tree);
Then iterate the list of resources to get the xml's:
A_CmsXmlDocument cmsXmlDocument =
CmsResourceCollector.getSingleCmsXmlDocument(cmsObject, resource);
- Eric
----- Original Message -----
From: "Daniel Beinlich" <u15618 at hs-harz.de>
To: "'The OpenCms mailing list'" <opencms-dev at opencms.org>
Sent: Friday, January 28, 2005 8:38 AM
Subject: [opencms-dev] ver. 6 a 3 -- How can I get the output in xml
> Hi all,
> I am newbie with opencms and I would like to know how I can get xml output
> instead of html output. The funktion to manage the articles in OC 6a3
would
> be perfect for my requirements. But I need only the xml code of the
articles
> like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Articles xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation=
> "opencms://sites/default/xmlcontent/article.xsd">
> <Article language="en">
> <Title><![CDATA[SampleArticle 1]]></Title>
> <Teaser><![CDATA[This is the first sample article.]]></Teaser>
> <Text name="element0"><links/>
> <content><![CDATA[<p>This is the article 1 text</p>content>
> </Text>
> </Article>
> </Articles>
>
>
> Can anyone help me to get the xml content of the articles?
>
> Thank you in advance,
>
> Dan
>
>
>
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list