473,396 Members | 1,968 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to Insert Closing for Nested Elements

Dear All,

I have an input without closing tags(only opening) e.g.,

input:
Expand|Select|Wrap|Line Numbers
  1. <index.level level="1" ref.id="001"><name>ADDRESSES</name>
  2. <index.level level="2"><name>Abel, I. W.</name> <locator punct.before=" ">34: A-4</locator><locator punct.before=", ">43: A-3</locator>
  3. <index.level level="2"><name>Abzug, Bella</name> <locator punct.before=" ">31: A-4</locator><locator punct.before=", ">48: A-11</locator>
  4. <index.level level="3"><name>Adams. Brock</name> <locator punct.before=" ">22: A-4</locator>
  5. <index.level level="4"><name>Albert, Carl</name> <locator punct.before=" ">36: A-9</locator>
output expected;
Expand|Select|Wrap|Line Numbers
  1. <index.level level="1" ref.id="001"><name>ADDRESSES</name>
  2. <index.level level="2"><name>Abel, I. W.</name> <locator punct.before=" ">34: A-4</locator><locator punct.before=", ">43: A-3</locator>
  3. </index.level><!--For index level 2-->
  4. <index.level level="2"><name>Abzug, Bella</name> <locator punct.before=" ">31: A-4</locator><locator punct.before=", ">48: A-11</locator>
  5. <index.level level="3"><name>Adams. Brock</name> <locator punct.before=" ">22: A-4</locator>
  6. <index.level level="4"><name>Albert, Carl</name> <locator punct.before=" ">36: A-9</locator>
  7. </index.level><!--For index level 4-->
  8. </index.level><!--For index level 3-->
  9. </index.level><!--For index level 2-->
  10. </index.level><!--And finally for index level 1-->
Please provide me some guidance to solve this problem.

Thanks,
Nov 17 '09 #1
1 1557
numberwhun
3,509 Expert Mod 2GB
I am not 100% on what your question really is, but as far as nested tags go, you should always close them in the reverse order that you opened them, with the last one opened being the first one closed.

Regards,

Jeff
Nov 17 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Stanimir Stamenkov | last post by:
Here's an example: <form action="bogus" method="post"> <p> <a href="prev.cgi"><input type="submit" name="prev" value="< Back"></a> <a href="next.cgi"><input type="submit" name="next"...
9
by: Dustin | last post by:
Here's what I am trying to do: (Names represent CSS classes.) I want to create a photo gallery. I want the entire gallery to be surrounded by a box named PhotoGallery. I want a fluid placement...
2
by: Brian | last post by:
Hi all. I have a bunch of pages that reference an external script from the head section. I'd like to add additional <script> elements to the pages' bodies, but I can't edit the pages...
5
by: horndude77 | last post by:
Ok, this might be for a web designing group, but here's my problem. I'm trying to make a web page with tabs which you can navigate between without the page reloading. I have one set of tabs working...
5
by: Markus Ernst | last post by:
Hi I have a validation problem with a form and nested divs. I understand what the problem is, but I don't see how to fix it. This is my normal page structure, and it validates: <!DOCTYPE HTML...
46
by: Neptune | last post by:
Hello. I am working my way through Zhang's "Teach yourself C in 24 hrs (2e)" (Sam's series), and for nested loops, he writes (p116) "It's often necessary to create a loop even when you are...
1
by: =?Utf-8?B?SmVyZW15X0I=?= | last post by:
I am working on an order entry program and have a question related to deserializing nodes with nested elements. The purchase order contains multiple line items which I select using an...
4
by: =?Utf-8?B?UmljaA==?= | last post by:
On a form - I have a datagridview which is docked to the entire form. The datagridview allows users to Delete and/or Add Rows. On the Form_Load event I Fill the datagridview source table with a...
1
by: Henrik Bechmann | last post by:
All, I'm trying to spoof Google's vertical tabs in a vertical menu structured with nested UL/LI elements. To do this, I need to find out where the anchor in the LI is, and then create an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...
0
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,...

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.