-
html-xml
If I have a html page such as the following:
<body>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 height=100% width=100%>
<TBODY><TR><TD align=middle>
<TABLE bgColor=black border=0 cellPadding=2 cellSpacing=1><TBODY><TR><TD>
<TABLE bgColor=silver border=0 cellPadding=3 cellSpacing=1 height=100% width=100%><TBODY><TR><TD
align=middle bgColor="#003366"><FONT color="#99CCFF">
<B>Order Details</B></FONT></TD></TR><TR><TD align=middle>
<FORM NAME="ordedi" METHOD=GET ACTION="ordedi.cgi">
<BR><TABLE BORDER=1><TBODY>
<TR><TD>ID:</TD><TD COLSPAN="3">2130</TD></TR><TR><TD>Order Time:</TD><TD
COLSPAN="3">2002-05-02 07:06:03</TD></TR><TR><TD>Client IP:</TD><TD COLSPAN="3">4.64.200.103</TD></TR><TR><TD
VALIGN="top">
Customer:</TD><TD COLSPAN="3">mickey mouse (<A HREF="custmail.cgi?session=113&auth=FKEsB4ZR&to=timshell@earthlink.net">timshell@earthlink .net</A>)
<A HREF="custedi.cgi?session=113&auth=FKEsB4ZR&cust_id=1363&back=ordedi&ord_id=2130"><IMG
SRC="images/infosmall.gif" ALT="More info about this customer" BORDER="0"></A></TD></TR><TR><TD
VALIGN="top">Order Content:</TD><TD COLSPAN="3"><PRE>Desc
Ref Qty Amount
Car flag FL- CR1 1 5.50
Shipping Costs 5.95
----------------------------------------------------------
TOTAL 11.45 USD</PRE></TD></TR><TR><TD>Payment
Method:</TD><TD COLSPAN="3">Credit Card</TD></TR><TR><TD VALIGN="top">Credit
Card Info:</TD><TD COLSPAN="3">Owner: nan goldberg<BR>Type: American Express<BR>Number:
11111111<BR>Expiration: 06/03 (month/year)</TD></TR>
<TR><TD>Shipping Method:</TD><TD COLSPAN="3">Airmail</TD></TR><TR><TD VALIGN="top">Shipping
Address:</TD><TD COLSPAN="3">mickey mouse<BR>12 hight street<BR>02653 orleans,
ma<BR>USA<TR><TD>Paid:</TD><TD><INPUT NAME="ord_paid" TYPE="CHECKBOX" ></TD><TD>Shipped:</TD><TD><INPUT
NAME="ord_shipped" TYPE="CHECKBOX" onClick="return sendmail();"></TD></TR><TR><TD
VALIGN="top">Your Comment:</TD><TD COLSPAN="3"><TEXTAREA NAME="ord_admcom"
WRAP=VIRTUAL ROWS="7" COLS="40"></TEXTAREA></TD></TR><INPUT NAME="session"
TYPE="HIDDEN" VALUE="113"><INPUT NAME="auth" TYPE="HIDDEN" VALUE="FKEsB4ZR"><INPUT
NAME="ord_id" TYPE="HIDDEN" VALUE="2130"><INPUT NAME="ord_sendmail" TYPE="HIDDEN"
VALUE="off">
</TBODY></TABLE>
</FORM>
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
How can I take out the information with XML that i need such as the payment
method and shipping address and place it on another page?
-
Re: html-xml
You don't really need XML do to this, just the DOM methods already available
for manipulating HTML pages.
See the DOM getElementByID method for a good starting point.
As your example stands, it's not valid XML, and you can't read it with a
parser. If you really want to change the pages into XHTML so that you can
manipulate it with an XML parser, search the Web for "HTML Tidy", which can
help you do that. You can start here: http://www.w3.org/People/Raggett/tidy/
Russell Jones
Executive Editor,
DevX.com
"avital" <atnagar@netvision.net.il> wrote in message
news:3cd13679$1@10.1.10.29...
>
> If I have a html page such as the following:
> <body>
>
> <TABLE align=center border=0 cellPadding=0 cellSpacing=0 height=100%
width=100%>
>
> <TBODY><TR><TD align=middle>
>
> <TABLE bgColor=black border=0 cellPadding=2 cellSpacing=1><TBODY><TR><TD>
>
> <TABLE bgColor=silver border=0 cellPadding=3 cellSpacing=1 height=100%
width=100%><TBODY><TR><TD
> align=middle bgColor="#003366"><FONT color="#99CCFF">
>
> <B>Order Details</B></FONT></TD></TR><TR><TD align=middle>
>
> <FORM NAME="ordedi" METHOD=GET ACTION="ordedi.cgi">
>
> <BR><TABLE BORDER=1><TBODY>
>
> <TR><TD>ID:</TD><TD COLSPAN="3">2130</TD></TR><TR><TD>Order Time:</TD><TD
> COLSPAN="3">2002-05-02 07:06:03</TD></TR><TR><TD>Client IP:</TD><TD
COLSPAN="3">4.64.200.103</TD></TR><TR><TD
> VALIGN="top">
> Customer:</TD><TD COLSPAN="3">mickey mouse (<A
HREF="custmail.cgi?session=113&auth=FKEsB4ZR&to=timshell@earthlink.net">tims
****@earthlink.net</A>)
> <A
HREF="custedi.cgi?session=113&auth=FKEsB4ZR&cust_id=1363&back=ordedi&ord_id=
2130"><IMG
> SRC="images/infosmall.gif" ALT="More info about this customer"
BORDER="0"></A></TD></TR><TR><TD
> VALIGN="top">Order Content:</TD><TD COLSPAN="3"><PRE>Desc
> Ref Qty Amount
> Car flag FL- CR1 1 5.50
>
> Shipping Costs 5.95
> ----------------------------------------------------------
> TOTAL 11.45
USD</PRE></TD></TR><TR><TD>Payment
> Method:</TD><TD COLSPAN="3">Credit Card</TD></TR><TR><TD
VALIGN="top">Credit
> Card Info:</TD><TD COLSPAN="3">Owner: nan goldberg<BR>Type: American
Express<BR>Number:
> 11111111<BR>Expiration: 06/03 (month/year)</TD></TR>
> <TR><TD>Shipping Method:</TD><TD COLSPAN="3">Airmail</TD></TR><TR><TD
VALIGN="top">Shipping
> Address:</TD><TD COLSPAN="3">mickey mouse<BR>12 hight street<BR>02653
orleans,
> ma<BR>USA<TR><TD>Paid:</TD><TD><INPUT NAME="ord_paid" TYPE="CHECKBOX"
></TD><TD>Shipped:</TD><TD><INPUT
> NAME="ord_shipped" TYPE="CHECKBOX" onClick="return
sendmail();"></TD></TR><TR><TD
> VALIGN="top">Your Comment:</TD><TD COLSPAN="3"><TEXTAREA NAME="ord_admcom"
> WRAP=VIRTUAL ROWS="7" COLS="40"></TEXTAREA></TD></TR><INPUT NAME="session"
> TYPE="HIDDEN" VALUE="113"><INPUT NAME="auth" TYPE="HIDDEN"
VALUE="FKEsB4ZR"><INPUT
> NAME="ord_id" TYPE="HIDDEN" VALUE="2130"><INPUT NAME="ord_sendmail"
TYPE="HIDDEN"
> VALUE="off">
>
> </TBODY></TABLE>
>
>
> </FORM>
>
>
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABL
E></BODY></HTML>
>
> How can I take out the information with XML that i need such as the
payment
> method and shipping address and place it on another page?
>
>
>
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks