473,770 Members | 5,136 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inserting Nodes between Nodes

Hi,

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

Expand|Select|Wrap|Line Numbers
  1. <child01>
  2. <child02>
  3. <text></text>
  4. <image>image 1</image>
  5. <image>image 2</image>
  6. </child02>
  7. </child01>
  8.  
into this node between the ending </child01and beginning <child01>
of the
Expand|Select|Wrap|Line Numbers
  1. <child01>
  2. <child02>
  3. <text></text>
  4. <image>image 1</image>
  5. <image>image 2</image>
  6. </child02>
  7. </child01>
  8. <child01>
  9. <child02>
  10. <text></text>
  11. <image>image 1</image>
  12. <image>image 2</image>
  13. </child02>
  14. </child01>
  15.  
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.
Jan 21 '08 #1
2 1625
On Jan 21, 12:34 am, cesarcesar <ce...@empireso lutions.netwrot e:
Hi,

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

Expand|Select|Wrap|Line Numbers
  1.     <child01>
  2.         <child02>
  3.             <text></text>
  4.             <image>image 1</image>
  5.             <image>image 2</image>
  6.         </child02>
  7.     </child01>
  8.  

into this node between the ending </child01and beginning <child01>
of the

Expand|Select|Wrap|Line Numbers
  1.     <child01>
  2.         <child02>
  3.             <text></text>
  4.             <image>image 1</image>
  5.             <image>image 2</image>
  6.         </child02>
  7.     </child01>
  8.     <child01>
  9.         <child02>
  10.             <text></text>
  11.             <image>image 1</image>
  12.             <image>image 2</image>
  13.         </child02>
  14.     </child01>
  15.  

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.
woops sorry, my 2nd XML is wrong. here is the correct.

Expand|Select|Wrap|Line Numbers
  1. <child01>
  2. <child02>
  3. <text></text>
  4. <image>image 1</image>
  5. <image>image 2</image>
  6. </child02>
  7. <child02>
  8. <text></text>
  9. <image>image 1</image>
  10. <image>image 2</image>
  11. </child02>
  12. </child01>
  13. <child01>
  14. <child02>
  15. <text></text>
  16. <image>image 1</image>
  17. <image>image 2</image>
  18. </child02>
  19. <child02>
  20. <text></text>
  21. <image>image 1</image>
  22. <image>image 2</image>
  23. </child02>
  24. </child01>
  25.  
Jan 21 '08 #2
On Jan 21, 12:34 am, cesarcesar <ce...@empireso lutions.netwrot e:
Hi,

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

Expand|Select|Wrap|Line Numbers
  1.     <child01>
  2.         <child02>
  3.             <text></text>
  4.             <image>image 1</image>
  5.             <image>image 2</image>
  6.         </child02>
  7.     </child01>
  8.  

into this node between the ending </child01and beginning <child01>
of the

Expand|Select|Wrap|Line Numbers
  1.     <child01>
  2.         <child02>
  3.             <text></text>
  4.             <image>image 1</image>
  5.             <image>image 2</image>
  6.         </child02>
  7.     </child01>
  8.     <child01>
  9.         <child02>
  10.             <text></text>
  11.             <image>image 1</image>
  12.             <image>image 2</image>
  13.         </child02>
  14.     </child01>
  15.  

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.
one other thing... i want to do this in PHP if possible, but other
languages are ok.
Jan 21 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1487
by: indo3 | last post by:
Hello, I program an xml editor with xerces for the university of Braunschweig, the user dont see any xml tags, it is represented in a JTree. Now the user shall be able to insert nodes, which conforms to the schema file (the user need not know what that is, its transparent to him). I found two approaches for doing that: 1. When xerces validates the source or the DOM tree (this is a new
2
2077
by: Lutz Ißler | last post by:
Hi all! I dymically replace the child nodes of a DIV element by image nodes. In IE and Firefox this works properly. In Safari it works properly, too - but only if the site is called locally, eg. with file://. Uploading to a server and viewing the site in Safari with http:// results in an error. The problematic code is the following: var node = document.createElement("img");
3
6920
by: Joachim Klassen | last post by:
Hi all, first apologies if this question looks the same as another one I recently posted - its a different thing but for the same szenario:-). We are having performance problems when inserting/deleting rows from a large table. My scenario: Table (lets call it FACT1) with 1000 million rows distributed on 12
6
2727
by: DWrek | last post by:
Here is my problem. I have an XML document that is returned to me by a third party service. The XML document contains results for a search but only lists a maximum of 10 results. If there are any further results then the XML document contains a URL to call and get the next set of 10 results. So if there were 25 results total I would get the first 10 in the first XML document, then after making a second request I would get results 11 to 20...
20
16648
by: alice | last post by:
I'm doing some text swapping with javascript, got it working fine, but I would like the line to have line breaks and being a beginner, I don't even know if this is possible. So I have a line like this swaptext('Shaun, Greg, Violet, Joel, 1999')"; and I would like 1999 to be on a new line. Is there a simple way to do this? I'd swear I've seen a way, but now I can't seem to find it.
7
15315
by: MaxMax | last post by:
I want to insert a white line between XML elements to raise human readability example: <MyNode> </MyNode> <MyNode> </MyNode>
2
1181
by: empiresolutions | last post by:
Hi, XML novice here with another question. I need to add a XML node like, <child01> <child02> <text></text> <image>image 1</image> <image>image 2</image>
2
1962
by: SMH | last post by:
I am in the process of converting all HTML documents, including many dynamic/interactive documents, to XHTML documents (because I want to incorporate SVG and MathML, among other things). I am having a problem converting document.write() statements which are not allowed in XHTML documents to statements which create the DOM nodes/elements dynamically within script elements.
2
3096
by: AlexanderDeLarge | last post by:
Hi! I got a problem that's driving me crazy and I'm desperately in need of help. I'll explain my scenario: I'm doing a database driven site for a band, I got these tables for their discography section: Discography --------------------- DiscID
0
10230
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10004
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9870
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8886
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6678
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3972
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.