[Gambas-user] Problem with Conv() and XmlWrite

Ron_1st ronstk at ...239...
Sat Dec 27 21:33:42 CET 2008


On Saturday 27 December 2008, Luigi Carlotto wrote:
> The strings do not contain characters of “Carriage Return” or “Line
> Feed”, but only space; if you have noticed interruptions, it is only a
> problem with the mail, or the editor using the function cut&paste.
> Probably, the option of “wrapping” of the editor, divides the line
> through spaces, but in the code all in a same and only string are
> comprised.
> 
> The sql commandos are, sometimes, composed from more of a word key, and
> they do not have sense if dealt in separate way; an example could be the
> definition of a PostgreSQL field of type “timestamp with time zones”.
> For program requirements, I have had to list in exact way, all the words
> key of the language sql, used from the motor of the database.
> 
> I have already executed the test on the single characters of the string,
> and I have not evidenced anomalous situations.
> As I have already written, the problem verification in phase of passage
> of the string to function XML; the conversion executed from Conv() is
> very well.
> If I execute “PRINT Conv(sType, “UTF-8”, “ASCII”)” from Console, the
> string it comes visualized in corrected way, with any LANG.
> 
> You perfectly have reason on the anomalous use of the attributes, but I
> have had to use this logic because of an other problem, that I have
> uncovered using the gb.xml library; it seems that it is not way to read
> xml files, composed from tag multilevel.
> With my tests, I have verified that the use of a hierarchical structure,
> with advanced levels to 2, does not come read, that is, they come only
> read the tag of first and second level; if a third level is present,
> comes ignored, etc. 
> 
> Like in other languages, the document xml begins with tag “root” (level
> 1), to which they are connected of the elements (level 2); Every element
> has, in its turn (attributes to part), a series under elements (level
> 3), and thus via, in hierarchical way.
> The methods of the library do not allow to read these ulterior elements,
> for which they have been forced to use a structure with 2 single levels,
> and the attributes for the values of the single element.
> 
> But to part this, probably, and as I had supposed, exists some problem
> in the writing of attributes much large; but the single anomaly
> verification with the use of an Asian language, while with the European
> languages all it works well.
> 
> It pardons me for my English bad one.
> 
> 
OK, understand the nasty problem of two levels.
It explains also why I had some problems to in the past.
I switched over to PHP for that matter.

Just a question, when using XML there is also a *.dtd explaining the elements
and the hiearchi of them.
Is it it allowed to have such long string and using spaces inside?
Does a space have speial meaning in the attributes value declaration?

In HTML using the class="first second" means the tag has two classes, 'first' and 'second'
May be something like this is also valid for your XML usage.

No problem for english, mine is also bad :)


Best regards,

Ron_1st

-- 




More information about the User mailing list