pbdom.saveDocument() method failing

I=92m seeking assistance from those who may have used PBDOM
to generate XML documents. I=92m 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=92m 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=3d'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 =3d 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 =3d 'TRUE'
	end if
//	MessageBox(this.className()+'.generateXML()',ls_segment)
	
catch (PBDOM_EXCEPTION ldom_except)
	as_message =3d ldom_except.getMessage()
	return -1
end try

return 1
</ code snippet >
0
Ray
10/29/2009 1:37:44 AM
sybase.powerbuilder.xml 546 articles. 0 followers. Follow

1 Replies
693 Views

Similar Articles

[PageSpeed] 37

Resolved.

> I=92m seeking assistance from those who may have used
PBDOM
> to generate XML documents. I=92m 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=92m 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=3d'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 =3d 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 =3d 'TRUE'
>     end if
> //    MessageBox(this.className()+'.generateXML()'
> ,ls_segment)
>
> catch (PBDOM_EXCEPTION ldom_except)
>     as_message =3d ldom_except.getMessage()
>     return -1
> end try
>
> return 1
> </ code snippet >
0
Ray
11/4/2009 11:12:38 PM
Reply:

Similar Artilces:

How can I use PBDOM_DOCUMENT.SaveDocument method to save XML string into a file?
HI: I want to use PBDOM_DOCUMENT.SaveDocument method to save a XML string into a file ,but when the path of file contain double-byte characters ( in DBCS environment), no file be saved , is there any way to save the data of PBDOM_DOCUMENT object into a DBSC file ? Thank you for your help! binli 2005-3-4PM binli wrote: > HI: > I want to use PBDOM_DOCUMENT.SaveDocument method to save a XML string > into a file ,but when the path of file contain double-byte characters ( > in DBCS environment), no file be saved , is there any way to save the > data of PBDOM_DOCUM...

How can I use PBDOM_DOCUMENT.SaveDocument method to save XML string into a file?
HI: I want to use PBDOM_DOCUMENT.SaveDocument method to save a XML string into a file ,but when the path of file contain double-byte characters ( in DBCS environment), no file be saved , is there any way to save the data of PBDOM_DOCUMENT object into a DBSC file ? Thank you for your help! binli 2005-3-4PM ...

SaveAs datawindow method failing in Windows XP OS for creation of an XML File
Goodday...We have PB9.01 Build 7236 and we are trying to save the results of a datawindow using the SaveAs function into an XML file. For some reason, the SaveAs function is failing, i.e. returning -1. The code is basically like this: li_rc=dw_newmmars_rpt.SaveAs(ls_dir+LEFT(message.stringparm,LEN(message.stringparm)-4)+".DAT" ,XML!,TRUE) The code works fine under Windows 2000 but is failing under Windows XP Professional. Any clue as to what might be going on? Any info would be greatly appreciated. :) I'm having the same problem under Windows Xp Professional with ...

XMl to XML
Hello,   I retrieved an XML from the dataset which retrieves data from the table in the database. I need to present the data  in a different structure. Is XSLT the way or are there any other options. please let me know. Thanks!! Yes XSLT is a good choice to convert xml file to other forms. You can take a look at XSLT Tutorial.Sincerely,Young Fang...

PowerBuilder with XML
Hi: I suggest that PowerBuilder support XML.If PowerBuilder have XML function or component,it will be much better than Delphi! Barkely I agree. With the database world increasingly dominated by XML, I find that searching the (beta) help files for PB8 there is not a single mention of XML, like this has passed by the folk at Sybase. What we need, at the very least, is a datawindow to output XML and accepts XML as input. I guess we will have to wait for PB9 now "Barkely" <barkelyhwang@mpinfo.com.tw> wrote in message news:...

XML in Powerbuilder
Is there functionality in Powerbuilder 7 or 8 for XML? Where could I find out more about it? There is no built-in XML support in PB7 or 8. PB9 will feature an XML parse and XML export/import support in the datawindow/datastore. In the meantime, you are limited to string concatenation and using the Microsoft MSXML parser via OLE automation. -- <hopethishelps/> Roy Kiesler [TeamSybase] Sybase Developer Network -- http://sdn.sybase.com <Jonna> wrote in message news:64B2A31B812014050068302685256BF2.0068303885256BF2@webforums... > Is there functionality in Powerb...

XML in, XML out
Hi All (and a happy holiday to those that will get a break), I am trying to read in an XML file of addresses. I need to remove all the address data from the file where code =~ /^000/ (there are none in the example data below). I need to reproduce that data 'as is', so I need to honour the tag structure, although the order of the tags doesn't need to be honoured. I have been trying to use XML::Simple and I had a go with XML::Smart but I haven't been able to get the results I want. My best effort is below (with XML::Simple). There are a couple of differences ...

XML Methods
Hi all,There were some methods available in Beta 1 of frame work 2.0 in System.XML class Method names are ReadAsObject and WriteFromObject and this methods are present under XmlWriter object....but in final release Microsoft drop this method.....U can read this completly at following link under "What Didn't Make It" heading....http://msdn.microsoft.com/msdnmag/issues/06/09/ServiceStation/default.aspxMy question is... what's the alternate of this method.....thanksPlease Mark as Answer, if the post Solve your Problem__________________________Regards,Sajjad RizviC U ON NETreply me : sajjaddot...

XML and PowerBuilder
Is anyone aware of an XML parser/utility which can be used with PowerBuilder? (DLL or something similar?) Regards Thomas Kellerer ========================================================== Who is user GENERAL FAILURE and why is he reading my disk? ...

XML from PBDOM
Hi all. How to get back XML string from PBDOM object/document? I found various GetText methods only. I need XML in string for return from my component method! Don't tell that I should save DOM in file and read it again... Regards, --------------------------------------- Jacek Borowiec jacek_borowiec@skg.pl Right now, that seems the only way, unless you want to traverse the tree and build the XML recursively. A ToString() method on PBDOM_Object could be a useful enhancement, something along the lines of org.jdom.output.XMLOutputter. Want to log it in? -- <ho...

The server method failed and object doesn't support this property or method
I create a basic Atlas page which includes a script manager, 2 javascript functions and a couple of controls. I also create a webservices to return a dataset for Atlas page. It works well when I compile the whole website in my local machine. But when I copy evrything to the live site, it gives me error message like:The server method failed and javascript error message like:object doesn't support this property or method . It doesn't make sense to me. Please help!!! And the strange thing now is it works in https:// site on any machine. But it doesn't work on some computers o...

"The server method '[method name]' failed" trying to pass array to WebMethod
I’ve got a vexing problem dealing with AJAX.   Within JavaScript, I have this –  var params = new Array();params[0] = $get("textBox1").value;params[1] = $get("textBox2").value;params[2] = $get("textBox3").value;params[3] = $get("textBox4").value;. . .params[22] = $get("textBox21").value;PageMethods.MyMethod(params, onSucceed, onFailed);  In my CodeBehind, I have this –  Public Shared Function MyMethod(ByVal params() As String) As String‘ Do stuff End Function  My problem is, I don’t ever enter the actual code ...

.method == $self.method or $_.method?
There's a discussion going on #perl6/irc.freenode.org right now wondering about what .method means. We'd all assumed it meant $self.method (where $self is always the method invocant) but then had a look at Synopsis 12 which states Dot notation can omit the invocant if it's in $_: .doit(1,2,3) This seems to cripple .method's usefulness by coupling it to $_ which can change often. Now in order to be safe for anything but trivial methods you're back to writing out $self all over the place, something that Perl 6 was supposed to fix about Perl 5. It...

Web method call fails when authorization is required
Hello everybody, I try to call a web-service method before authorization (when latter is required) on my login page. But when I call it through a proxy, like this -  MyNamespace.WebService.Login("name", "passw", false, OnComplete, OnTimeOut, OnError); I get runtime error on this line - 'MyNamespace' is undefined. And when I call it using WebServiceProxy.invoke(), like this -   Sys.Net.WebServiceProxy.invoke("/WebService.asmx", "Login", false, {"userName":strUserName, &...

Web resources about - pbdom.saveDocument() method failing - sybase.powerbuilder.xml

SNY0511 Crosstabs
Siena College Research Institute May 11-13, 15-17, 2011

The Dirty Outlaw
For every platform, Parse SDKs make it awesomely flexible to save a ParseObject . Sometimes we want to know whether a particular ParseObject ...

An Introduction To Unit Testing In AngularJS Applications
... = {text: 'Some text'}; $scope.$watch('document.text', function(value) { $scope.state.documentSaved = false; }, true); $scope.saveDocument = ...

BlueRope » Blog Archive » A couple of BRDocBase changes
I’ve been using BRDocBase fine in development for a few weeks. While it’s nowhere near complete, I haven’t had any real need for new features ...

Sept-2011-moynihan-dem-club-meeting-invit
The Daniel Patrick MoynihanDemocratic Club of QueensTwenty-Fifth Assembly District76-23 171 Street, Fresh Meadows, NY 11366moynihanclub@gmail.com ...

Resources last updated: 1/22/2016 2:41:13 AM