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.

pbdom.saveDocument() method failing

2 posts in XML Last posting was on 2009-11-04 23:12:38.0Z
Ray KAUSAE Posted on 2009-10-29 01:37:44.0Z
Sender: 368b.4ae8ee93.1804289383@sybase.com
From: Ray KAUSAE
Newsgroups: sybase.public.powerbuilder.xml
Subject: pbdom.saveDocument() method failing
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4ae8f1e8.36ee.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 28 Oct 2009 17:37:44 -0800
X-Trace: forums-1-dub 1256780264 10.22.241.41 (28 Oct 2009 17:37:44 -0800)
X-Original-Trace: 28 Oct 2009 17:37:44 -0800, 10.22.241.41
Lines: 46
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.xml:1857
Article PK: 814378

I’m seeking assistance from those who may have used PBDOM
to generate XML documents. I’m having problems serializing
documents using the saveDocument() method. The method seems
to fail whenever I pass in a fully qualified document name
such as pbdom_doc.saveDocument( 'c:\xmlDocs\xsmadef.xml').
It seems to work when I issue a call using relative path,
such as, pbdom_doc.saveDocument('xsmadef.xml'). However, I
need to be able to use the fileOpen() dialog box to let
users nominate the location where to save the resulting XML
document. Could someone point me in the right direction
please? I’m using PB11.5.1 Build 4011 on Windows XP sp2.
See code snippet below.

Greatly appreciate your help.

Thanks
Ray KAUSAE

< code snippet >
string ls_path, &
ls_key[], &
ls_segment='FALSE', &
ls_message

if this.in_string.of_isEmpty(as_key[1]) then return -1
if this.in_string.of_isEmpty(as_message) then return -1

try
this.in_string.of_parseToArray(as_message,'|', ls_key)
this.is_class = ls_key[1]
this.of_getRootElement(as_message, ls_segment,ls_message)
this.of_getHeader(ls_key[5], ls_key[6], ls_message)
this.of_getBody(as_key, ls_key[5], ls_message)

if this.idom_document.saveDocument('xsmadef.xml') then
ls_segment = 'TRUE'
end if
// MessageBox(this.className()+'.generateXML()',ls_segment)

catch (PBDOM_EXCEPTION ldom_except)
as_message = ldom_except.getMessage()
return -1
end try

return 1
</ code snippet >


Ray KAUSAE Posted on 2009-11-04 23:12:38.0Z
Sender: 569b.4af209eb.1804289383@sybase.com
From: Ray Kausae
Newsgroups: sybase.public.powerbuilder.xml
Subject: Re: pbdom.saveDocument() method failing
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4af20a66.56b6.1681692777@sybase.com>
References: <4ae8f1e8.36ee.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 4 Nov 2009 15:12:38 -0800
X-Trace: forums-1-dub 1257376358 10.22.241.41 (4 Nov 2009 15:12:38 -0800)
X-Original-Trace: 4 Nov 2009 15:12:38 -0800, 10.22.241.41
Lines: 53
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.xml:1858
Article PK: 814380

Resolved.

> I’m seeking assistance from those who may have used
PBDOM
> to generate XML documents. I’m having problems
serializing
> documents using the saveDocument() method. The method
> seems to fail whenever I pass in a fully qualified
> document name such as pbdom_doc.saveDocument(
> 'c:\xmlDocs\xsmadef.xml'). It seems to work when I issue a
> call using relative path, such as,
> pbdom_doc.saveDocument('xsmadef.xml'). However, I need to
> be able to use the fileOpen() dialog box to let users
> nominate the location where to save the resulting XML
> document. Could someone point me in the right direction
> please? I’m using PB11.5.1 Build 4011 on Windows XP sp2.
> See code snippet below.
>
> Greatly appreciate your help.
>
> Thanks
> Ray KAUSAE
>
> < code snippet >
> string ls_path, &
> ls_key[], &
> ls_segment='FALSE', &
> ls_message
>
> if this.in_string.of_isEmpty(as_key[1]) then return -1
> if this.in_string.of_isEmpty(as_message) then return -1
>
> try
> this.in_string.of_parseToArray(as_message,'|', ls_key)
> this.is_class = ls_key[1]
> this.of_getRootElement(as_message, ls_segment
> ,ls_message)
> this.of_getHeader(ls_key[5], ls_key[6], ls_message)
> this.of_getBody(as_key, ls_key[5], ls_message)
>
> if this.idom_document.saveDocument('xsmadef.xml') then
> ls_segment = 'TRUE'
> end if
> // MessageBox(this.className()+'.generateXML()'
> ,ls_segment)
>
> catch (PBDOM_EXCEPTION ldom_except)
> as_message = ldom_except.getMessage()
> return -1
> end try
>
> return 1
> </ code snippet >