473,387 Members | 1,530 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,387 software developers and data experts.

custom xml pretty print

Hi,

I have Document. If I print it like this:

print doc.toprettyxml(" ")

I will get this:
<a>
<b>
<c>
blablablabla
</c>
</b>
</a>

What do I have to do if I want to print it like this:
<a>
<b>
<c>blablablabla</c>
</b>
</a>

Thank you.

Nov 22 '05 #1
2 2291
akbar wrote:
Hi,

I have Document. If I print it like this:

print doc.toprettyxml(" ")

I will get this:
<a>
<b>
<c>
blablablabla
</c>
</b>
</a>

What do I have to do if I want to print it like this:
<a>
<b>
<c>blablablabla</c>
</b>
</a>


Use a SAX-Handler, parse it yourself and pretty-print your own. You
_could_ use DOM, but I don't think its needed here.

Diez
Nov 22 '05 #2
akbar wrote:
Hi,

I have Document. If I print it like this:

print doc.toprettyxml(" ")

I will get this:
<a>
<b>
<c>
blablablabla
</c>
</b>
</a>

What do I have to do if I want to print it like this:
<a>
<b>
<c>blablablabla</c>
</b>
</a>


Use a SAX-Handler, parse it yourself and pretty-print your own. You
_could_ use DOM, but I don't think its needed here.

Diez
Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: r6uji7 | last post by:
hello, is it possible to print certain details on a fixed area of a paper using PHP? here's the scenario: i'm trying to print labels with names and addresses. the names and addresses are...
3
by: Neil Zanella | last post by:
Hello, In Python, classes are objects. But there is no way to custom print a class object. This would require some syntax such as the one commented out below: With the current "foo =...
3
by: Shane | last post by:
I am trying to create a custom command bar with three custom buttons, however when I try to make the procedure there is no "CommandBar" option to choose from and is not recognized for the...
1
by: Tim | last post by:
Hi, I would like to create a custom mouse cursor for my print preview page. I want to use a bitmap of a magnifiying glass with a plus in it. Pretty standard stuff. How do I change the cursor?...
0
by: Anniech | last post by:
I use VB.NET to integrate with crystal report 9.0 to print a report with custom paper size (using Dot Matrix printer). I have already added a custom paper size in the printer server and set the...
0
by: akbar | last post by:
Hi, I have Document. If I print it like this: print doc.toprettyxml(" ") I will get this: <a> <b> <c>
1
by: Anne DeBlois | last post by:
Hi, I want to programatically set the paper size of a print document. I created a class that inherits PrintDocument, so I can print some database records on 8" x 10" paper. I added this line...
3
by: moondaddy | last post by:
I have a windows WPF sample project which is starting to work pretty good. I can drag shapes and lines, and connect a straight line to any place on a custom rectangle shape's boarder. Now I have a...
0
by: nikhilgargi | last post by:
Requirement: I need to provide printing capability in a C# desktop application that I am developing The documents that need to be printed can be in Rich Text Format (RTF) or HTML. Custom...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.