Re: Java XML document creation
- From: Roedy Green <look-on@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 01 Sep 2005 21:10:44 GMT
On 1 Sep 2005 09:36:11 -0700, alfienorks@xxxxxxxxxxx wrote or quoted :
>XMLNodesArray[] = { '/a/b/c', '/a/b/d', '/z/y/x', '/z/y/a' };
this notation so far as I know is something you cooked up, and empty
data files are not something there is a big demand for. So I will
hazard a guess you wont' find a canned solution.
Tackling the problem from scratch, here is how I would proceed.
1. use regex to convert a/b/c to new String[]{ "a", "b", "c" };
2. write some looping code to convert that to
<root>
<a>
<b>
<c></c>
</b>
</a>
</root>
3. write some looping code to convert two lines '/a/b/c', '/a/b/d' to
what you want.
4. keep going, adding more lines until you see the general patterns.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
.
- Follow-Ups:
- Re: Java XML document creation
- From: alfienorks
- Re: Java XML document creation
- References:
- Java XML document creation
- From: alfienorks
- Java XML document creation
- Prev by Date: Thread.stop() (no don't go away, please read!!!)
- Next by Date: Re: What is the URL of a timestamp server for jarsigner?
- Previous by thread: Re: Java XML document creation
- Next by thread: Re: Java XML document creation
- Index(es):
Relevant Pages
|