The default template is too basic. The template generated
automatically in the datawindow object painter works for us, but we do
not want to manually create templates for our thousands of
dataobjects.
How do I create an XML Template at runtime using PB11?
I'm not sure it's possible... Even if you build the XMLSchema from the
resultset definition, the Datawindow.Data.XMLSchema and
Datawindow.Export.XML.Template[num].Name properties are not modifiable at
runtime.
I think that means you have to reference an XML template that's already
saved into the dw definition in the painter.
If you really need to export data as XML from any potential dw in your app,
I would look at building a generic XML export class that built the XML
output without using templates.
--
Paul Horan[Sybase]
paulhoran.pbdjmagazine.com
"kilstromcraig" <kilstr...@yahoo.com> wrote in message
news:31c8c311-2ef1-4e11...@t39g2000prh.googlegroups.com...
The template generated by default in the datawindow painter
would work. The methods already exist. Couldn't they be
exposed at runtime, perhaps from within the PBDOM?
Open datawindow.
View > Export/Import Template > XML
Save.
Repeat for each datawindow...
Then you'll have the default template saved into the datawindow syntax.
--
Paul Horan[Sybase]
paulhoran.pbdjmagazine.com
<Craig Kilstrom> wrote in message news:49623cb6.1b...@sybase.com...
I think I'll write a routine to spin through the rows and columns,
writing xml on the fly -- handles even dynamically-created dataobjects
and lot's easier for all concerned.
Thanks Paul for your continuing help on all things PowerBuilder.