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.

Import XML into a DataWindow

2 posts in XML Last posting was on 2010-01-08 15:01:41.0Z
Chris Werner Posted on 2010-01-07 10:18:00.0Z
From: "Chris Werner" <cwAT{PleaseNoSpam}f-s.de>
Newsgroups: sybase.public.powerbuilder.xml
Subject: Import XML into a DataWindow
Lines: 40
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b45b4d8$1@forums-1-dub>
Date: 7 Jan 2010 02:18:00 -0800
X-Trace: forums-1-dub 1262859480 10.22.241.152 (7 Jan 2010 02:18:00 -0800)
X-Original-Trace: 7 Jan 2010 02:18:00 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.xml:1877
Article PK: 814398

Hi all,

having never used DataWindow XML Import I wonder about the
limitations of this technique. I have to import a XML file containing
order headers and order items. So I thought I can achieve that using
a grouped DataWindow but that seems to be wrong. Here is a
shortened sample of the data I like to import:

<?xml version="1.0" encoding="utf-8"?>
<ORDER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.healy-hudson.com/XMLSchema/Schlecker/1.1"
xsi:schemaLocation="http://www.healy-hudson.com/XMLSchema/Schlecker/1.1
file:///c:/Development/Ordering%20V3/V3.NET/Schlecker/Schlecker.Schemas/orderraw.xsd">
<ORDER_HEADER>
<ORDER_ID>BNR SL1</ORDER_ID>
...
</ORDER_HEADER>
<ORDER_ITEM_LIST>
<TASK>
<CUSTOMER_ORDER_ID>61616</CUSTOMER_ORDER_ID>
<DELIVERY_DATE>2008-12-30T06:00:50.153</DELIVERY_DATE>
<CUSTOMER_ID>4711</CUSTOMER_ID>
</TASK>
<TASK>
<CUSTOMER_ORDER_ID>99999</CUSTOMER_ORDER_ID>
<DELIVERY_DATE>2008-12-30T06:00:50.153</DELIVERY_DATE>
<CUSTOMER_ID>4712</CUSTOMER_ID>
</TASK>
</ORDER_ITEM_LIST>
</ORDER>

As you see the <TASK> structure occurs more than one time.

Thanks for any hint,

Chris Werner
f+s software gmbh


Bruce Armstrong Posted on 2010-01-08 15:01:41.0Z
From: Bruce Armstrong <NOCANSPAM_bruce.armstrong@yahoo.com>
Newsgroups: sybase.public.powerbuilder.xml
Subject: Re: Import XML into a DataWindow
Reply-To: NOCANSPAM_bruce.armstrong@yahoo.com
Message-ID: <sbiek5d3j035n46jci02jsms2qefpf263b@4ax.com>
References: <4b45b4d8$1@forums-1-dub>
X-Newsreader: Forte Agent 5.00/32.1171
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: 8 Jan 2010 07:01:41 -0800
X-Trace: forums-1-dub 1262962901 10.22.241.152 (8 Jan 2010 07:01:41 -0800)
X-Original-Trace: 8 Jan 2010 07:01:41 -0800, vip152.sybase.com
Lines: 58
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.xml:1881
Article PK: 767962

The DataWindow currently doesn't import nested data, it only exports
it. You might want to look at using the PBDOM method to load the data
and manipulate it into the datawindow.

On 7 Jan 2010 02:18:00 -0800, "Chris Werner"

<cwAT{PleaseNoSpam}f-s.de> wrote:

>Hi all,
>
>having never used DataWindow XML Import I wonder about the
>limitations of this technique. I have to import a XML file containing
>order headers and order items. So I thought I can achieve that using
>a grouped DataWindow but that seems to be wrong. Here is a
>shortened sample of the data I like to import:
>
><?xml version="1.0" encoding="utf-8"?>
><ORDER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>xmlns="http://www.healy-hudson.com/XMLSchema/Schlecker/1.1"
>xsi:schemaLocation="http://www.healy-hudson.com/XMLSchema/Schlecker/1.1
>file:///c:/Development/Ordering%20V3/V3.NET/Schlecker/Schlecker.Schemas/orderraw.xsd">
> <ORDER_HEADER>
> <ORDER_ID>BNR SL1</ORDER_ID>
> ...
> </ORDER_HEADER>
> <ORDER_ITEM_LIST>
> <TASK>
> <CUSTOMER_ORDER_ID>61616</CUSTOMER_ORDER_ID>
> <DELIVERY_DATE>2008-12-30T06:00:50.153</DELIVERY_DATE>
> <CUSTOMER_ID>4711</CUSTOMER_ID>
> </TASK>
> <TASK>
> <CUSTOMER_ORDER_ID>99999</CUSTOMER_ORDER_ID>
> <DELIVERY_DATE>2008-12-30T06:00:50.153</DELIVERY_DATE>
> <CUSTOMER_ID>4712</CUSTOMER_ID>
> </TASK>
> </ORDER_ITEM_LIST>
></ORDER>
>
>As you see the <TASK> structure occurs more than one time.
>
>Thanks for any hint,
>
>Chris Werner
>f+s software gmbh
>

-----------------------------------

My Web 2.0 Stuff

Blog: http://bruce.pbdjmagazine.com/
Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
Fotki: http://public.fotki.com/brucearmstrong/
LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
Twitter: http://twitter.com/bruce_armstrong
YouTube: http://www.youtube.com/user/brucearmstrong