FW: FW: [Mashup-user] FW: Manipulating XML and HTML files
Jonathan Marsh
jonathan at wso2.com
Wed Mar 12 11:54:21 PDT 2008
I uploaded a sample to mooshup.com showing the merging of scraped pages and
of local XML files. You can try this service online or download it to your
local Mashup Server and use it as a basis for your document merging project.
https://mooshup.com/mashup.jsp?path=/mashups/jonathan/mergingfiles
Jonathan Marsh - http://www.wso2.com - http://auburnmarshes.spaces.live.com
> -----Original Message-----
> From: mashup-user-bounces at wso2.org [mailto:mashup-user-
> bounces at wso2.org] On Behalf Of Ajay Kamathbolasrinivas
> Sent: Wednesday, March 12, 2008 6:57 AM
> To: keith at wso2.com; mashup-user at wso2.org
> Subject: FW: FW: FW: [Mashup-user] FW: Manipulating XML and HTML files
>
>
>
> Please provide the solution...needed badly
>
> Regards,
> Ajay
>
>
> -----Original Message-----
> From: Ajay Kamathbolasrinivas
> Sent: Wednesday, March 12, 2008 6:20 PM
> To: 'keith at wso2.com'; 'mashup-user at wso2.org'
> Subject: FW: FW: FW: [Mashup-user] FW: Manipulating XML and HTML files
>
> Hi,
> Sorry for late reply...
> What details you want? Can u please specify?
>
> Regards,
> Ajay
>
>
> -----Original Message-----
> From: mashup-user-bounces at wso2.org [mailto:mashup-user-
> bounces at wso2.org] On
> Behalf Of Keith Chapman
> Sent: Wednesday, March 12, 2008 2:59 PM
> To: mashup-user
> Subject: Re: FW: FW: [Mashup-user] FW: Manipulating XML and HTML files
>
> Can u send the detail please.
>
> Thanks,
> keith.
>
> Ajay Kamathbolasrinivas wrote:
> > No I need not have to go through a proxy...
> > Working on a local host machine.
> >
> > I have created a new service, inside that I have pasted the below
> code..
> > When I deploy the service using tryit option...it is givine the error
> >
> > "IO error during HTTP execution for URL: http://wso2.org [detail]"
> >
> > Regards,
> > Ajay
> >
> >
> > -----Original Message-----
> > From: mashup-user-bounces at wso2.org [mailto:mashup-user-
> bounces at wso2.org] On
> > Behalf Of Keith Chapman
> > Sent: Wednesday, March 12, 2008 2:42 PM
> > To: mashup-user
> > Subject: Re: FW: [Mashup-user] FW: Manipulating XML and HTML files
> >
> > Cau you send the full stack trace (the detail). Do you need to go
> > through a proxy?
> >
> > Thanks,
> > Keith.
> >
> > Ajay Kamathbolasrinivas wrote:
> >> Hi, Thanks for reply...
> >> But when I execute the below code I am getting the following error
> >>
> >> "IO error during HTTP execution for URL: http://wso2.org [detail]"
> >>
> >> Why? plz reply
> >>
> >> Regards,
> >> Ajay
> >>
> >>
> >> -----Original Message-----
> >> From: mashup-user-bounces at wso2.org [mailto:mashup-user-
> bounces at wso2.org]
> On
> >> Behalf Of Keith Chapman
> >> Sent: Wednesday, March 12, 2008 2:02 PM
> >> To: mashup-user
> >> Subject: Re: [Mashup-user] FW: Manipulating XML and HTML files
> >>
> >> Hi Ajay,
> >>
> >> There are various approaches to do this. Here is an example where I
> have
> >> used the scraper object to get the two html files and then used E4X
> to
> >> merge them. You can do some complex merging using E4X depending on
> your
> >> requirement.
> >>
> >> function test(){
> >>
> >> var config = <config>
> >> <var-def name='a'>
> >> <html-to-xml>
> >> <http method='get'
> url='http://wso2.org'/>
> >> </html-to-xml>
> >> </var-def>
> >> <var-def name='b'>
> >> <html-to-xml>
> >> <http method='get'
> >> url='http://wso2.org/projects/mashup'/>
> >> </html-to-xml>
> >> </var-def>
> >> </config>
> >> var scraper = new Scraper(config);
> >> //striping off the XML decleration
> >> var a = new XML(scraper.a.substring(scraper.a.indexOf('?>') + 2));
> >> var b = new XML(scraper.b.substring(scraper.b.indexOf('?>') + 2));
> >> a.append = b
> >> return a;
> >>
> >> }
> >>
> >> Thanks,
> >> Keith.
> >>
> >>
> >> Ajay Kamathbolasrinivas wrote:
> >>> Please provide the solution for the below problem:-
> >>>
> >>> Example:- I have 2 XML files say A.xml and B.xml with some contents
> in it
> >>>
> >>> I want to merge A and B XML files so that contents of
> both
> files
> >>> are merged or combined to any single file...
> >>>
> >>> Is it possible?
> >>> Please provide the code if it is possible...
> >>>
> >>> Pls Reply....
> >>> Thanks in advance
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> Regards,
> >>> Ajay
> >>>
> >>>
> >>> -----Original Message-----
> >>> From: Channa Gunawardena [mailto:channa at wso2.com]
> >>> Sent: Tuesday, March 11, 2008 3:29 PM
> >>> To: Ajay Kamathbolasrinivas; mashup-user at wso2.org
> >>> Subject: Manipulating XML and HTML files
> >>>
> >>> Hi Ajay,
> >>>
> >>> Yes, you can certainly combine the contents of 2 XML files in the
> Mashup
> >>> server. You'll probably find it easiest to manipulate XML files
> using
> >>> E4X and this link
> >>> (http://wso2.org/project/mashup/1.0.2/docs/e4xquickstart.html) will
> show
> >>> you how to get started.
> >>>
> >>> Generally, if you use the Scraper host object to retrieve an HTML
> page,
> >>> you will retrieve it as XML, so you would then actually be working
> with
> >>> 2 XML documents. The first example provided in the Scraper host
> object
> >>> documentation here
> >>> (http://wso2.org/project/mashup/1.0.2/docs/scraperhostobject.html)
> shows
> >>> you how to write a simple configuration to get the contents of a
> web
> >>> page as XML.
> >>>
> >>> Please do let us know if you need more details.
> >>>
> >>> Bye,
> >>> Channa.
> >>>
> >>> Ajay Kamathbolasrinivas wrote:
> >>>> Hi,
> >>>>
> >>>> Thanks for replying my queries related to WSO2 mashup server..
> >>>>
> >>>> I have another question
> >>>>
> >>>> 1. Can we merge 2 html or xml files in mashup server?
> >>>> 2. Can we merge 2 file of 2 different formats (1 html and 1 xml)?
> >>>>
> >>>> Pls help...
> >>>> Thanks in advance
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> With Best Regards,
> >>>> Ajay Kamath B S | Programmer Analyst| MindTree Consulting Ltd.
> |Global
> >>>> Village, RVCE Post, Bangalore-560059
> >>>> INDIA|Mobile:9886789974|email:ajay_kamathbolasrinivas at mindtree.com
> >>>> |www.mindtree.com
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> DISCLAIMER:
> >>>> This message (including attachment if any) is confidential and may
> be
> >>> privileged. If you have received this message by mistake please
> notify
> the
> >>> sender by return e-mail and delete this message from your system.
> Any
> >>> unauthorized use or dissemination of this message in whole or in
> part is
> >>> strictly prohibited.
> >>>> E-mail may contain viruses. Before opening attachments please
> check them
> >>> for viruses and defects. While MindTree Consulting Limited
> (MindTree) has
> >> put
> >>> in place checks to minimize the risks, MindTree will not be
> responsible
> > for
> >>> any viruses or defects or any forwarded attachments emanating
> either from
> >>> within MindTree or outside.
> >>>> Please note that e-mails are susceptible to change and MindTree
> shall
> not
> >>> be liable for any improper, untimely or incomplete transmission.
> >>>> MindTree reserves the right to monitor and review the content of
> all
> >>> messages sent to or from MindTree e-mail address. Messages sent to
> or
> from
> >>> this e-mail address may be stored on the MindTree e-mail system or
> else
> >>> where.
> >>>>
> >>
> >> _______________________________________________
> >> Mashup-user mailing list
> >> Mashup-user at wso2.org
> >> http://wso2.org/cgi-bin/mailman/listinfo/mashup-user
> >>
> >>
> >> DISCLAIMER:
> >> This message (including attachment if any) is confidential and may
> be
> > privileged. If you have received this message by mistake please
> notify the
> > sender by return e-mail and delete this message from your system. Any
> > unauthorized use or dissemination of this message in whole or in part
> is
> > strictly prohibited.
> >> E-mail may contain viruses. Before opening attachments please check
> them
> > for viruses and defects. While MindTree Consulting Limited (MindTree)
> has
> put
> > in place checks to minimize the risks, MindTree will not be
> responsible for
> > any viruses or defects or any forwarded attachments emanating either
> from
> > within MindTree or outside.
> >> Please note that e-mails are susceptible to change and MindTree
> shall not
> > be liable for any improper, untimely or incomplete transmission.
> >> MindTree reserves the right to monitor and review the content of all
> > messages sent to or from MindTree e-mail address. Messages sent to or
> from
> > this e-mail address may be stored on the MindTree e-mail system or
> else
> > where.
> >
> >
> > _______________________________________________
> > Mashup-user mailing list
> > Mashup-user at wso2.org
> > http://wso2.org/cgi-bin/mailman/listinfo/mashup-user
> >
> >
> > DISCLAIMER:
> > This message (including attachment if any) is confidential and may be
> privileged. If you have received this message by mistake please notify
> the
> sender by return e-mail and delete this message from your system. Any
> unauthorized use or dissemination of this message in whole or in part
> is
> strictly prohibited.
> > E-mail may contain viruses. Before opening attachments please check
> them
> for viruses and defects. While MindTree Consulting Limited (MindTree)
> has put
> in place checks to minimize the risks, MindTree will not be responsible
> for
> any viruses or defects or any forwarded attachments emanating either
> from
> within MindTree or outside.
> > Please note that e-mails are susceptible to change and MindTree shall
> not
> be liable for any improper, untimely or incomplete transmission.
> > MindTree reserves the right to monitor and review the content of all
> messages sent to or from MindTree e-mail address. Messages sent to or
> from
> this e-mail address may be stored on the MindTree e-mail system or else
> where.
> >
>
>
> _______________________________________________
> Mashup-user mailing list
> Mashup-user at wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/mashup-user
>
>
> DISCLAIMER:
> This message (including attachment if any) is confidential and may be
> privileged. If you have received this message by mistake please notify
> the sender by return e-mail and delete this message from your system.
> Any unauthorized use or dissemination of this message in whole or in
> part is strictly prohibited.
> E-mail may contain viruses. Before opening attachments please check
> them for viruses and defects. While MindTree Consulting Limited
> (MindTree) has put in place checks to minimize the risks, MindTree will
> not be responsible for any viruses or defects or any forwarded
> attachments emanating either from within MindTree or outside.
> Please note that e-mails are susceptible to change and MindTree shall
> not be liable for any improper, untimely or incomplete transmission.
> MindTree reserves the right to monitor and review the content of all
> messages sent to or from MindTree e-mail address. Messages sent to or
> from this e-mail address may be stored on the MindTree e-mail system or
> else where.
>
> _______________________________________________
> Mashup-user mailing list
> Mashup-user at wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/mashup-user
More information about the Mashup-user
mailing list