Thank you Daniel, but I am getting confuse more.
Your code has shown "<ABCD> " in the debug window and "<ABCD>" in
the text area.
That mean xpathQuery() could not handle '&#60;' but <text> tag could
do it, right?
Where your point is ?
Thx
mt1
Daniel Williams wrote:
> mt1,
> I don't think this is a Laszlo code issue. You may need to use the
> numeric reference , here is a list.
>
> Ampersand & & &#38;
> Left angle bracket < < &#60;
> Right angle bracket > > >
> Straight quotation mark " " '
> Apostrophe ' ' "
>
>
> Try this code out if you want to display "<ABCD>" to the user, FYI I'm
> running 3.3.3 .
>
> <canvas debug="true">
> <dataset name="ds">
> <data>&#60;ABCD></data>
> </dataset>
>
> <handler name="oninit">
> var dp = new LzDatapointer();
> dp.setPointer(ds);
>
> Debug.write( "dp serialize : " + dp.serialize() );
> Debug.write( "dp xpathQuery: " + dp.xpathQuery("data/text()") );
>
> var text = dp.xpathQuery('data/text()');
> testText.setAttribute('text', text);
>
> </handler>
>
> <view bgcolor="blue" width="100" height="100">
> <text id="testText" resize="true" text="Hello"/>
> </view>
> </canvas>
>
> Just my 2 cents.
> -Daniel
>
> mt1 wrote:
>
>> Any hints?
>>
>> mt1 wrote:
>>
>>> Yes i thought so, but there were not it in xpathQuery() method or
>>> *.as files.
>>> So i confused where it has been done.
>>> You can see that where is ?
>>>
>>> Thanks
>>> mt1
>>>
>>> Not Zippy wrote:
>>>
>>>> I believe the data is being unescaped.
>>>> Debug.write(unescape("<ABCD>") )
>>>>
>>>>
>>>> On 3/5/07, *mt1* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
>>>> wrote:
>>>>
>>>> Hi forks,
>>>>
>>>> I am wondering how to handle a escape characters in
>>>> LzDatapointer.xpathQuery().
>>>> This is a example code.
>>>>
>>>> <canvas debug="true">
>>>> <dataset name="ds">
>>>> <data><ABCD></data>
>>>> </dataset>
>>>>
>>>> <handler name="oninit">
>>>> var dp = new LzDatapointer();
>>>> dp.setPointer(ds);
>>>>
>>>> Debug.write( "dp serialize : " + dp.serialize() );
>>>> Debug.write( "dp xpathQuery: " + dp.xpathQuery("data/text()") );
>>>> </handler>
>>>> </canvas>
>>>>
>>>> You can see the data with escaped in <dataset> tag.
>>>> And the first debug line ( using serialize() ) shows the strings
>>>> without
>>>> modification,
>>>> but the second debug line ( using xpathQuery() ) shows "<ABCD>"
>>>> out of
>>>> the way by
>>>> operating unescaped.
>>>> I took a look around LzDatapointer.as or LzDataElement.as, but
>>>> xpathQuery() do not
>>>> translate from '>' to '<' anywhere.
>>>>
>>>> Please let me know why xpathQuery() can do such like that ?
>>>>
>>>> mt1
>>>>
>>>>
>>>
>>
>
>
>