Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XML, can add a child node but can't delete one.
Message
De
30/03/2001 11:24:48
 
 
À
30/03/2001 02:29:50
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00490116
Message ID:
00490347
Vues:
8
Following is the VFP simple solution for the previous message.

Thank you Cetin, you put me on the right path


************************************************************

loxml = createobject('Microsoft.xmldom')
loxml.load('c:\temp.xml')

* Reference to Child to be removed
lodelete = loxml.selectSingleNode('ESIGNA/TQuery/row CHR(91) xcorr=1.220 CHR(93) ')

***** chr(91) represents left square bracket
***** chr(93) represents Right Square Braket

* Reference to Parent
loparent = loxml.selectNodes('ESIGNA/TQuery/row')

* Get count of child nodes to be removed
icnt = lodummy.childNodes.length

* Loop to remove the child nodes
FOR iloop = 1 TO icnt
lnodes = loparent.item(0).removeChild(lodelete.childNodes(0))
ENDFOR

**************************************************************************

********************
** XML file layout
********************
ESIGNA>
TQuery>
row>
uniqueid/>
fkuniqueid>0 /fkuniqueid>
xcorr>1.220 /xcorr>
ycorr>1.650 /ycorr>
name>CASHIER CHECK /name>
item>SAMOUNT /item>
font>0 /font>
/row>
row>
uniqueid/>
fkuniqueid>0 /fkuniqueid>
xcorr>0.700 /xcorr>
ycorr>1.750 /ycorr>
name>CASHIER CHECK /name>
item>*27EXACTLY /item>
font>0 /font>
/row>
/TQuery>
/ESIGNA>
Fred Lauckner

You know, it works on my computer. I don't know what your problem is.

.Net aint so bad.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform