Inserting Nodes between Nodes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • empiresolutions
    New Member
    • Apr 2006
    • 162

    Inserting Nodes between Nodes

    Hi,

    XML novice here with another question. I need to add a XML node like,

    Code:
        <child01>
            <child02>
                <text></text>
                <image>image 1</image>
                <image>image 2</image>
            </child02>
        </child01>
    into this node between the ending </child01> and beginning <child01> of the


    Code:
        <child01>
            <child02>
                <text></text>
                <image>image 1</image>
                <image>image 2</image>
            </child02>
        </child01>    
        <child01>
            <child02>
                <text></text>
                <image>image 1</image>
                <image>image 2</image>
            </child02>
        </child01>
    Does this make sense? I guess im looking for a way to say/do... make a new node with the following values and place it between these other two nodes.

    I still am learning XML but i think this can be done.
  • empiresolutions
    New Member
    • Apr 2006
    • 162

    #2
    woops sorry, my 2nd XML is wrong. here is the correct.

    Code:
    <child01>
    	<child02>
    		<text></text>
    		<image>image 1</image>
    		<image>image 2</image>
    	</child02>
    	<child02>
    		<text></text>
    		<image>image 1</image>
    		<image>image 2</image>
    	</child02>
    </child01>
    <child01>
    	<child02>
    		<text></text>
    		<image>image 1</image>
    		<image>image 2</image>
    	</child02>
    	<child02>
    		<text></text>
    		<image>image 1</image>
    		<image>image 2</image>
    	</child02>
    </child01>

    Comment

    • empiresolutions
      New Member
      • Apr 2006
      • 162

      #3
      one other thing... i want to do this in PHP if possible, but other languages are ok.

      Comment

      Working...