Announcement Announcement Module
Collapse
No announcement yet.
BATCH-1377 StaxEventItemWriter: Handle namespace for the root tag Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • BATCH-1377 StaxEventItemWriter: Handle namespace for the root tag

    Dave Syer added a comment - 04/Jan/10 7:39 PM

    I modified the solution to use a naming convention (like in Spring WS) for the namespace elements: you can use a rootTagName in the form {uri}prefix:name (where the prefix is optional).

    could I use the following to generate <Price xsi:schemaLocation="fsrv Price.xsd" xmlns="fsrv" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="22"> in the XML?


    <bean id="rsXMLWriter" class="org.springframework.batch.item.xml.StaxEven tItemWriter">
    <property name="marshaller" ref="rsMarshaller" />
    <property name="rootTagName" value="Price {url}xmlns:fsrv " />
    <property name="rootElementAttributes">
    <util:map>
    <entry key="xsi:schemaLocation" value="fsrv Price.xsd" />
    <entry key="xmlns:xsi" value="http://www.w3.org/2001/XMLSchema-instance" />
    <entry key="Version" value="22" />
    </util:map>
    </property>
    .....

    Please advise me, thanks in advance!

    XZ
Working...
X