need help with tidy.exe for XML

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
rcmpayne
Posts: 11
Joined: Fri Aug 07, 2009 5:02 pm

need help with tidy.exe for XML

Post by rcmpayne »

Hello All,

I am looking for a way to take a xml log file and have it converted.

here is a example:

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="h
ttp://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3
.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XM
LSchema"><soap:Header><gwTrace xmlns="http://schemas.novell.com/20
05/01/GroupWise/types">False</gwTrace><session xmlns="http://schem
as.novell.com/2005/01/GroupWise/types">qe2154hheIY7D7hyA</session><
/soap:Header><soap:Body><getAddressBookListRequest xmlns="http://s
chemas.novell.com/2005/01/GroupWise/methods" /></soap:Body></soap:
Envelope>


When i run it in Tidy via textpad i get the following errors:


line 1 column 1 - Warning: missing <!DOCTYPE> declaration

line 1 column 1 - Warning: plain text isn't allowed in <head> elements

line 1 column 1 - Info: <head> previously mentioned

line 1 column 1 - Warning: inserting implicit <body>

line 1 column 52 - Error: <soap:envelope> is not recognized!

line 1 column 52 - Warning: discarding unexpected <soap:envelope>

line 4 column 23 - Error: <soap:header> is not recognized!

line 4 column 23 - Warning: discarding unexpected <soap:header>

line 4 column 36 - Error: <gwtrace> is not recognized!

line 4 column 36 - Warning: discarding unexpected <gwtrace>

line 5 column 42 - Warning: discarding unexpected </gwtrace>

line 5 column 52 - Error: <session> is not recognized!

line 5 column 52 - Warning: discarding unexpected <session>

line 6 column 69 - Warning: discarding unexpected </session>

line 7 column 27 - Error: <soap:body> is not recognized!

line 7 column 27 - Warning: discarding unexpected <soap:body>

line 7 column 38 - Error: <getaddressbooklistrequest> is not recognized!

430536 warnings, 174184 errors were found! Not all warnings/errors were shown.
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

Tidy is afaik specialised for HTML - it does not work for xml.
rcmpayne
Posts: 11
Joined: Fri Aug 07, 2009 5:02 pm

Post by rcmpayne »

ok thanks,

do you have nyother programs that i can use to help me tidy up XML?
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Is this tidy.exe from http://tidy.sourceforge.net/?

Use
tidy -xml file.xml
It's in the help.
Post Reply