Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How easy convert Html encoded text to clear text?
Message
From
01/06/2010 09:55:00
 
 
To
01/06/2010 09:51:04
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01466814
Message ID:
01466848
Views:
52
Hi,
Thanks for response!
I made a simple code.. in my case I need to convert HTML encoded text to plain text and my little function with XMLTOCURSOR is enough !

Thanks
Denis

>>Hi Cetin,
>>Unfortunately the XMLAdapter can't load this xml (it has many layers inside) (same with XMLToCursor.. but..
>>Hmmm... as Idea to create simple xml using this value what I need to convert maybe good..
>>One moment.. I will try this idea!
>>
>>
>>
>>>>Hi,
>>>>I have a text in the XML node encoded with HTML & and so on..
>>>>What is easy way to convert this value to clear text?
>>>>
>>>>Thanks
>>>>Denis
>>>
>>>You can use XMLToCursor() or XMLAdapter class.
>>>Cetin
>
>XMLAdapter can load XML with many level hierarchies. ie:
>
>
>CLOSE DATABASES all
>USE _samples+"\data\customer" IN 0
>SELECT cust_id,order_id,emp_id FROM _samples+"\data\orders" WHERE !EMPTY(shipped_on) INTO CURSOR xx readwrite
>INDEX on cust_id TAG cust_id
>USE _samples+"\data\orditems" IN 0 ORDER tag order_id
>SET RELATION TO order_id INTO 'orditems' IN 'xx'
>SET RELATION TO cust_id INTO 'xx' IN 'customer'
>
>LOCAL oAdapter as XMLAdapter
>oAdapter = CREATEOBJECT('xmlAdapter')
>oAdapter.RespectNesting = .t.
>oAdapter.XMLName=STRCONV('MyNameInsteadOfVFPDataSet',12)
>oAdapter.AddTableSchema('customer',.t.)
>oAdapter.AddTableSchema('xx',.t.)
>oAdapter.AddTableSchema('orditems',.t.)
>oAdapter.ToXML('mynestedxml')
>
>CLOSE DATABASES all
>* If you want to see content
>STRTOFILE(m.mynestedxml,'xx.txt')
>MODIFY FILE xx.txt
>ERASE xx.txt
>
>LOCAL oAdapter as XMLAdapter
>oAdapter = CREATEOBJECT('xmlAdapter')
>oAdapter.RespectNesting = .t.
>*oAdapter.XMLSchemaLocation = 'd:\temp\myExternalsSchema.xsd'
>oAdapter.LoadXML(m.mynestedxml)
>oAdapter.Tables(1).ToCursor()
>oAdapter.Tables(2).ToCursor()
>oAdapter.Tables(3).ToCursor()
>
>Cetin
Previous
Reply
Map
View

Click here to load this message in the networking platform