Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Not writing empty element when saveas

2 posts in XML Last posting was on 2008-05-22 13:41:06.0Z
Steen Christiansen Posted on 2008-05-22 09:06:30.0Z
From: Steen Christiansen <Stc.nordrupby20@gmail.com>
Newsgroups: sybase.public.powerbuilder.xml
Subject: Not writing empty element when saveas
Date: Thu, 22 May 2008 02:06:30 -0700 (PDT)
Organization: http://groups.google.com
Lines: 23
Message-ID: <1b6caa41-6ebf-4bae-97ec-d36fc15d8e48@f36g2000hsa.googlegroups.com>
NNTP-Posting-Host: 193.163.248.30
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1211447191 6181 127.0.0.1 (22 May 2008 09:06:31 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 22 May 2008 09:06:31 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: f36g2000hsa.googlegroups.com; posting-host=193.163.248.30; posting-account=OqXjAgoAAACIuINow37mw4XK-zJs8rha
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9) Gecko/2008051206 Firefox/3.0,gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!nlpi057.nbdc.sbc.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!f36g2000hsa.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.xml:1743
Article PK: 767923

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


Bruce Armstrong [TeamSybase] Posted on 2008-05-22 13:41:06.0Z
From: "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.xml
Subject: Re: Not writing empty element when saveas
Reply-To: NOCANSPAM_bruce.armstrong@teamsybase.com
Message-ID: <8ota34tc0n9erfl0u87n6eemnk1vc4ctvn@4ax.com>
References: <1b6caa41-6ebf-4bae-97ec-d36fc15d8e48@f36g2000hsa.googlegroups.com>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 22 May 2008 06:41:06 -0700
X-Trace: forums-1-dub 1211463666 10.22.241.152 (22 May 2008 06:41:06 -0700)
X-Original-Trace: 22 May 2008 06:41:06 -0700, vip152.sybase.com
Lines: 36
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.xml:1746
Article PK: 814304

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