Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 

Go Back   XSL - XML - RSS Forums > Programming and XML > Sybase Powerbuilder and XML

Tags:



Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-26-2008, 12:53 PM
Steen Christiansen
 
Posts: n/a

Default Not writing empty element when saveas



I am using a datawindow for generation of an XML file where have a
block of data for the address information.
Looks like this when exported

<Address>
<Line>bla bla bla</Line>
<Line>bla bla bla</Line>
<Line/>
<Line/>
</Address>

In this case the employee only have 2 address lines and the export
allows for 4.
The recieving system treats the 2 empty lines as errors and i would
therefore like them not to
be generated when exporting this data.
Is there anyway i can avoid this from inside PB using a export XML
template from a datawindow?
Or do i have to run through my XML file after generation using PBDOM
and removing empte child
elements.

All help appreciated
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-26-2008, 12:53 PM
Bruce Armstrong [TeamSybase]
 
Posts: n/a

Default Re: Not writing empty element when saveas


How is somebody that is going to use this XML distiguish between the
various lines of the address? AFAIK, child elements should have
unique names (e.g., line1, line2, line3, etc.)

If you've got a client that is trying to import the file and is having
problems, it may be due to the non-uniqueness of the child element
names rather than because some are null.

On Thu, 22 May 2008 02:06:30 -0700 (PDT), Steen Christiansen
<Stc.nordrupby20@gmail.com> wrote:

>I am using a datawindow for generation of an XML file where have a
>block of data for the address information.
>Looks like this when exported
>
><Address>
><Line>bla bla bla</Line>
><Line>bla bla bla</Line>
><Line/>
><Line/>
></Address>
>
>In this case the employee only have 2 address lines and the export
>allows for 4.
>The recieving system treats the 2 empty lines as errors and i would
>therefore like them not to
>be generated when exporting this data.
>Is there anyway i can avoid this from inside PB using a export XML
>template from a datawindow?
>Or do i have to run through my XML file after generation using PBDOM
>and removing empte child
>elements.
>
>All help appreciated


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Contact Us -|- XSL - XML - RSS Forums -|- Archive -|- Top -|-Rules/Disclaimer-|-Help/Support -|-Advertise
© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
All times are GMT. The time now is 09:21 AM.
Style Developed by Epic Designz