Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert XML to string in a report
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Convert XML to string in a report
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01593004
Message ID:
01593004
Vues:
39
How would you process an xml file in a report? For example, say a cursor has a field which stores an XML string of the following format:
<Field>
	<Name>MyField1</Name>
	<OldValue>123</OldValue>
	<NewValue>3321</NewValue>
</Field>
<Field>
	<Name>MyField2</Name>
	<OldValue>ABC</OldValue>
	<NewValue>NBC</NewValue>
</Field>
In the report I would like to show the above XML as:

Field: MyField1 Before: 123 After: 3321
Field: MyField2 Before: ABC After: NBC

Is the only way to accomplish this by using some UDF where on every row of the report a cursor is created from the XML and then parsed into a string and returned?

Or is there a simpler approach? Btw, I am open to suggestions to change the format of XML or to use another type of string instead of XML.

TIA.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform