1. Pierre Couvreur
  2. PowerBuilder
  3. Tuesday, 6 December 2022 11:44 AM UTC

Hello,

I use datastore importString() method to import XML.

The first line is usually xml version="1.0" encoding="utf-8" standalone="yes" but it happens that the double-quotes are replaced by single-quotes, giving xml version='1.0' encoding='utf-8' standalone='yes'

When it occurs, importString() returns -11 - XML Parsing Error; XML parser libraries not found or XML not well formed.

Is it normal behaviour ? Shouldn't importString() accept both syntax ? I tried PB2019R2 and 2022 with the same result.

Thank you !

Pierre

 

Andreas Mykonios Accepted Answer Pending Moderation
  1. Tuesday, 6 December 2022 12:20 PM UTC
  2. PowerBuilder
  3. # 1

Hi.

Can you show us the whole line of xml declaration? Normally single quotes can be used.

I understand you import your xml to a datawindow. So maybe there is a limitation as at the designer the declaration is shown with double quotes...

Andreas.

Comment
There are no comments made yet.
Pierre Couvreur Accepted Answer Pending Moderation
  1. Tuesday, 6 December 2022 13:06 PM UTC
  2. PowerBuilder
  3. # 2

Hi Andreas,

Here is the xml first lines :

<?xml version='1.0' encoding='<?xml version='1.0' encoding='UTF-8'?>
<dataStore nature="strict" producedBy="FormPublisher v3.5" media="desktop">
     <identification>

 

 I do import the XML into a datastore using an xml import template :

       

Indeed double-quotes are used in the template, but shouldn't single-quotes be admited anyway ?

Pierre

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Tuesday, 6 December 2022 13:12 PM UTC
  2. PowerBuilder
  3. # 3

Yes. Single quotes should be accepted...

Is the following the first line?

<?xml version='1.0' encoding='<?xml version='1.0' encoding='UTF-8'?>

Because <?xml version='1.0' encoding=' is shown two times. This is wrong I think.

The correct would be something like that:

<?xml version='1.0' encoding='UTF-8'?>

Andreas.

Comment
There are no comments made yet.
Pierre Couvreur Accepted Answer Pending Moderation
  1. Tuesday, 6 December 2022 13:20 PM UTC
  2. PowerBuilder
  3. # 4

I don't know what I dit with copy/paste ! The fist lines are :

    

Comment
  1. Miguel Leeuwe
  2. Wednesday, 7 December 2022 12:33 PM UTC
Hi, well, at least there's a workaround !

regards
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 7 December 2022 13:36 PM UTC
Hi Pierre;

Please open a Support Ticket for this issue. Thanks.

Regards ... Chris
  1. Helpful
  1. Pierre Couvreur
  2. Wednesday, 7 December 2022 13:42 PM UTC
Hello Chris,

Of course I will,

Thank you all.

Pierre
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.