469,364 Members | 2,346 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,364 developers. It's quick & easy.

mixing raw xml display w/ formated display

I am an xml beginner trying to figure out if xml will be a good tool
for a problem.

I want to use the functionality associated with viewing raw xml files
(namely the expanding +'s and -'s), but I also want to not display
elements.

For example, if I had:

<name attr='Person 1'>
<first>Carl</first>
<last>Strange</last>
</name>
<name attr='Person 2'>
<first>Jules</first>
<last>Verne</last>
</name>

I would want it to display as

+ Person 1
+ Person 2

where I could then expand it to:

- Person 1
Carl Strange
+ Person 2

Any recommendations? Is this easy in xml? Or is some other tool
better? Thanks

Jul 20 '05 #1
2 3213


blank101 wrote:

I want to use the functionality associated with viewing raw xml files
(namely the expanding +'s and -'s)
Raw XML files are text files so if you view them raw then you should
only the markup.
What you describe is what some browsers do (namely IE 5/6 on Win and
Mozilla browsers) which apply some XSLT default stylesheet to XML not
associated otherwise with a stylesheet to create a HTML document
displaying the XML as a tree structure that can be collapsed and
expanded with the help of script.
but I also want to not display
elements.

For example, if I had:

<name attr='Person 1'>
<first>Carl</first>
<last>Strange</last>
</name>
<name attr='Person 2'>
<first>Jules</first>
<last>Verne</last>
</name>

I would want it to display as

+ Person 1
+ Person 2

where I could then expand it to:

- Person 1
Carl Strange
+ Person 2

Any recommendations? Is this easy in xml? Or is some other tool
better?


As said, what you see in the browser is HTML with script generated from
XSLT, that is possible of course to do, you need to write an XSLT
stylesheet that generates HTML with script as necessary.
The default stylesheet is available I think, google for that.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Don Grover | last post: by
reply views Thread by Ben | last post: by
3 posts views Thread by Mike Allen | last post: by
3 posts views Thread by Tim | last post: by
3 posts views Thread by sb Luis | last post: by
7 posts views Thread by Ubantu Rococo | last post: by
3 posts views Thread by lialie | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.