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.

Xpath Expressions

3 posts in DataWindow Last posting was on 2008-03-27 15:20:26.0Z
Jorge Quintana Posted on 2008-03-26 22:09:20.0Z
Reply-To: "Jorge Quintana" <jorge.quintana@laborfinders.com>
From: "Jorge Quintana" <jorge.quintana@laborfinders.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Xpath Expressions
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47eac990$1@forums-1-dub>
Date: 26 Mar 2008 14:09:20 -0800
X-Trace: forums-1-dub 1206569360 10.22.241.152 (26 Mar 2008 14:09:20 -0800)
X-Original-Trace: 26 Mar 2008 14:09:20 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86522
Article PK: 415785

All,

Does anybody know if Xpath expressions can be used in datawindow in order to
derive values from parent nodes? for example I want my detail band to list
all companies, and I want to have column that contains the projectID along
with all other values of the company node just like if it was another field
or atrtribute of the company record right there in the detail band. If i am
able to do that i can easily have a referencce to the Project (ProjectID)
that the company is part of.

If XPath is not supported and you know of other way to accomplish this
please share.

as always any help is greatly appreciated

Jorge

<Projects Version="1.1" ExportDate="2007-03-09" >
<Project ProjectID="100006616" Title="CUMBERLAND HS PART III PHASE III">
<Companies>
<Company Role="Architect" Name="KAESTLE BOOS ASSOC(KBA) INC"
CompanyID="1025580"></Company>
<Company Role="Owner" Name="TOWN OF CUMBERLAND PURCHASING DEPT"
CompanyID="1015222"></Company>
</Companies>
</Project>
</projects>


Dave Fish [TeamSybase] Posted on 2008-03-26 23:09:23.0Z
From: "Dave Fish [TeamSybase]" <dfish@[N0Spam]sybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Xpath Expressions
Organization: TeamSybase
Reply-To: dfish@no_spamm_sybase.com
Message-ID: <kkllu316nie175vgl0a59f94rpmjedlltb@4ax.com>
References: <47eac990$1@forums-1-dub>
X-Newsreader: Forte Agent 4.2/32.1118
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: 26 Mar 2008 15:09:23 -0800
X-Trace: forums-1-dub 1206572963 10.22.241.152 (26 Mar 2008 15:09:23 -0800)
X-Original-Trace: 26 Mar 2008 15:09:23 -0800, vip152.sybase.com
Lines: 44
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86523
Article PK: 415792

The DataWindow doesn't support Xpath. There is a code example on
CodeXchange of using XPath through PBNI. You could also use PBDOM
which is included in PowerBuilder 9 and higher. In any event you'll
have to manipulate the XML after the DataWindow generates it.

Regards,
Dave Fish
Sybase

PowerBuilder Blog:
http://powerbuilderevangelist.blogspot.com/

On 26 Mar 2008 14:09:20 -0800, "Jorge Quintana"

<jorge.quintana@laborfinders.com> wrote:

>All,
>
>Does anybody know if Xpath expressions can be used in datawindow in order to
>derive values from parent nodes? for example I want my detail band to list
>all companies, and I want to have column that contains the projectID along
>with all other values of the company node just like if it was another field
>or atrtribute of the company record right there in the detail band. If i am
>able to do that i can easily have a referencce to the Project (ProjectID)
>that the company is part of.
>
>If XPath is not supported and you know of other way to accomplish this
>please share.
>
>as always any help is greatly appreciated
>
>Jorge
>
><Projects Version="1.1" ExportDate="2007-03-09" >
> <Project ProjectID="100006616" Title="CUMBERLAND HS PART III PHASE III">
> <Companies>
> <Company Role="Architect" Name="KAESTLE BOOS ASSOC(KBA) INC"
>CompanyID="1025580"></Company>
> <Company Role="Owner" Name="TOWN OF CUMBERLAND PURCHASING DEPT"
>CompanyID="1015222"></Company>
> </Companies>
> </Project>
></projects>
>
>


Jorge Quintana Posted on 2008-03-27 15:20:26.0Z
Reply-To: "Jorge Quintana" <jorge.quintana@laborfinders.com>
From: "Jorge Quintana" <jorge.quintana@laborfinders.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <47eac990$1@forums-1-dub> <kkllu316nie175vgl0a59f94rpmjedlltb@4ax.com>
Subject: Re: Xpath Expressions
Lines: 81
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47ebbb3a@forums-1-dub>
Date: 27 Mar 2008 07:20:26 -0800
X-Trace: forums-1-dub 1206631226 10.22.241.152 (27 Mar 2008 07:20:26 -0800)
X-Original-Trace: 27 Mar 2008 07:20:26 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86526
Article PK: 415791

Dave thanks for the response, my problem is that I want to import a data
feed I receive via XML, this XML file has a complex nested hierarchy you
know parent rcords containing child records, these child records containing
more child records, etc. So in order to import this data in my tables I
need to have the correct Reference ID to the parent on the detail row.



Using my example I can load all data if I place the "Start Detail" marker in
the right place (at top of the hierarchy in order to read values from parent
nodes), however the Project ID is only populated every time there is a new
project, for example if I have a project with 10 companies, then the next
project has 5 companies and the following project 7 companies, and so on. I
want to have a datawindow that will include all companies as the dataset and
have the ProjectID as a column of that data set so that I can easily have
the reference id in the same row, well the data window will populate the
ProjectID in the 1st row hen in the 11th row then in the 18th row, etc. I
found a work around by using global functions with global variables for
implementing a mechanism to remember the values for the parent nodes. But I
am hoping to find a better solution inside the datawindow.



Do you have any ideas?



Jorge

"Dave Fish [TeamSybase]" <dfish@[N0Spam]sybase.com> wrote in message
news:kkllu316nie175vgl0a59f94rpmjedlltb@4ax.com...
> The DataWindow doesn't support Xpath. There is a code example on
> CodeXchange of using XPath through PBNI. You could also use PBDOM
> which is included in PowerBuilder 9 and higher. In any event you'll
> have to manipulate the XML after the DataWindow generates it.
>
> Regards,
> Dave Fish
> Sybase
>
> PowerBuilder Blog:
> http://powerbuilderevangelist.blogspot.com/
>
> On 26 Mar 2008 14:09:20 -0800, "Jorge Quintana"
> <jorge.quintana@laborfinders.com> wrote:
>
>>All,
>>
>>Does anybody know if Xpath expressions can be used in datawindow in order
>>to
>>derive values from parent nodes? for example I want my detail band to list
>>all companies, and I want to have column that contains the projectID along
>>with all other values of the company node just like if it was another
>>field
>>or atrtribute of the company record right there in the detail band. If i
>>am
>>able to do that i can easily have a referencce to the Project (ProjectID)
>>that the company is part of.
>>
>>If XPath is not supported and you know of other way to accomplish this
>>please share.
>>
>>as always any help is greatly appreciated
>>
>>Jorge
>>
>><Projects Version="1.1" ExportDate="2007-03-09" >
>> <Project ProjectID="100006616" Title="CUMBERLAND HS PART III PHASE III">
>> <Companies>
>> <Company Role="Architect" Name="KAESTLE BOOS ASSOC(KBA) INC"
>>CompanyID="1025580"></Company>
>> <Company Role="Owner" Name="TOWN OF CUMBERLAND PURCHASING DEPT"
>>CompanyID="1015222"></Company>
>> </Companies>
>> </Project>
>></projects>
>>
>>