Wiki: RepositoryService.setContent()

Description
dirkk
Posts: 1
Joined: Fri Nov 18, 2011 9:50 am

Wiki: RepositoryService.setContent()

Postby dirkk » Tue Nov 22, 2011 2:46 pm

Hello,

i have used the DocumentBuilder from the following Threadto get a XML-File from the Repository via the RepositoryService:


Code: Select all

#set($repoService = $polarionTool.repositoryService)
#set($connection = $repoService.getConnection($polarionTool.location))
#set($path = "somexmlfile.xml")
#set($input = $connection.getContent($polarionTool.location.getLocation($path)))
#set($doc = $xmlTool.documentBuilderFactory.newDocumentBuilder().parse($input))


Everything works fine, i can read the xml file and have the advantage of an easy to use XML-DOM. But how can i save it? The RepositoryConnection provides a method "setContent", but it requires a InputStream as parameter. How can i get a Reader for this method from my (modified) org.apache.xerces.dom.DeferredDocumentImpl in pure polarion wiki?

Best regards and thanks in advance,
Dirk

Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 20 guests