It sounds like what you really want is to use an xml stylesheet. I'm
not sure what the best way to do that with jQuery is. There may be
some way to do it natively, also a quick search brought up this
plugin:
http://www.jongma.org/webtools/jquery/xslt/

An explanation of xlst:
http://www-128.ibm.com/developerworks/xml/library/x-xdpshpul.html?open&l=976,t=gr#code5

If you know the structure of the xml, another workaround could also be
to style the xml directly with css. You could display: block on all
the elements, then position them to get the tabbed effect. Then use
the pseudo class :before {content: <tagname>} and :after {content: </
tagname>} to get the tags in there.

I'd be interested to hear how you end up doing it.

Colin

On Jan 10, 6:57 am, bweaverusenet <[EMAIL PROTECTED]> wrote:
> Thanks, George. You know, anymore when I'm doing javascript I just
> have jQuery on the brain, so naturally I posted what's mostly a
> general javascript question to a jQuery group. Well, actually, I was
> hoping to find some elegant jQuery voodoo or perhaps a plugin that
> does this before reverting to something more rudimentary or rolling my
> own. ;-)
>
> Thanks again.
>
> On Jan 10, 8:17 am, George <[EMAIL PROTECTED]> wrote:
>
> > I'm not aware of any existing solution so I'd probably consider using
> > regular expressions to add line feeds and tabs between elements. It
> > will help alot if you can assume the xml will be well formed. Given
> > the nature of this forum you might also consider a jQuery solution
> > that iterates (recursively?) through the tree to copy element names
> > and attributes as xml to a text string.
>
> > George
>
> > On Jan 9, 8:35 pm, bweaverusenet <[EMAIL PROTECTED]> wrote:
>
> > > Any ideas? Thanks! -bill

Reply via email to