XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 3rd, 2011, 08:36 AM
Bindhu M Bindhu M is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2011
Posts: 2 Bindhu M User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 23 m 46 sec
Reputation Power: 0
To copy all the child nodes except one node

Hello All,

I need some assistance on how to copy child node by child node.

I have to form a new XML in which the DICOM node has to be completely replaced with new DICOM node.

The requirement is that i have to copy
1. Measurement node with all its attributes but no child node to be copied.
2. Copy childnode Subresult with all its attributes. But child node DICOM should not be copied.

3. In place of DICOM node a new DICOM node(with updated value) will be placed.
4. Close the SubResult node

5.Copy Data node.
6.Close the Measurement node


Can somebody throw some light on how to go about this ?

I tried with <xsl:copy> ,<xsl:copy of> but I am not able to progress.

Regards
Bindhu M


PHP Code:
<Measurement MultiFetus="False" Id="m_ped_IVSd_2D" Category="cat_System" App="a_PedCard" Mode="mode_2D" UserLabel="" LocalLabel="IVSd (2D)" Tool="t_2D_Distance" ResultCount="5" Selector="sel_Avg" Bilateral="False" PrimaryResult="r_Distance">
                <
SubResult Name="r_Distance" Units="u_mm" UnitsString="cm" Precision="4" Conversion="0.1" DefaultChoice="True" UsedInCalc="True">
                    <
DICOM>
                        <
app csd="DCM" cv="125195" cm="Pediatric Cardiac Ultrasound Report"/>
                        <
group csd="SRT" cv="T-32410" cm="Interventricular septum"/>
                        <
site csd="SRT" cv="T-32410" cm="Interventricular septum"/>
                        <
concept csd="LN" cv="59089-3" cm="ROI Thickness by US"/>
                        <
mode csd="SRT" cv="G-03A2" cm="2D mode"/>
                        <
phase csd="SRT" cv="F-32011" cm="End Diastole"/>
                    </
DICOM>
                </
SubResult>
                <
Data Selector="sel_Avg">
                    <
Result Index="0">
                        <
SubResult Name="r_Distance" Value="13.7" Source="1318231201"/>
                    </
Result>
                    <
SelectedResult>
                        <
SubResult Name="r_Distance" Value="13.7"/>
                    </
SelectedResult>
                </
Data>
            </
Measurement>
        </
MasterList

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > To copy all the child nodes except one node

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap