472,345 Members | 1,594 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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 3365


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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Don Grover | last post by:
Hi I have to return dates formated in different ways in an asp page from sql server. What function can I use or how can I return dates formated...
3
by: BC | last post by:
Hi I am trying to display the formated text, a table like, in the tooptip in C#. Something like this: Apple 4 lime 100 I...
0
by: Ben | last post by:
Hi, Can you display data, for example datagrid, in a "Formatted Excel Form" dynamically? I mean the data in datagrid will be display on the...
3
by: Mike Allen | last post by:
Can anyone recommend a component that displays asp.net source code on a web page, with formatted layout and vs.net-like color scheme? Basically...
3
by: Tim | last post by:
Hi I have a program that I had written in Managed C++ that writes messages to the console while running. I wanted to allow the user to enter...
3
by: sb Luis | last post by:
I Use the following code to read from MS Word, but I couldent read Formated Text (RTF). How Can I read formated text from MS Word Doc without using...
7
by: Ubantu Rococo | last post by:
Hi all, Sorry for this stupid question, but I am having trouble mixing imagecopy etc. with HTML. What I am trying to do is copy an image, and then...
0
southoz
by: southoz | last post by:
Good ay all , I'm fairly new to access(a little over 5 weeks now). Since I'v started I have picked up a lot of useful information from forums such...
3
by: lialie | last post by:
Hi, Is there a fine way to read a formated file like: %HEADER title = "Untilted" username = "User" %DATA ....... ....... The formated file...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...

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.