i'm trying to programatically read the xml that is used to create a
webpage through xslt transformations .
I can view the XML when i go to "View Source" in internet explorer,
but whenever i try to download the webpage programmaticall y i can't
ever get the source XML, i always get the transformed html.
Any ideas? I've tried everything i can think of :( 7 5741
dakrin wrote:
i'm trying to programatically read the xml that is used to create a
webpage through xslt transformations .
I can view the XML when i go to "View Source" in internet explorer,
but whenever i try to download the webpage programmaticall y i can't
ever get the source XML, i always get the transformed html.
Any ideas? I've tried everything i can think of :(
wget or dog does it for me.
///Peter
On Mar 5, 5:01 pm, Peter Flynn <peter.n...@m.s ilmaril.iewrote :
>
wget or dog does it for me.
///Peter
Well, I'm trying to finding a way to programatically do it using c#.
I've tried using xmlDocument.loa d(), getresponsestre am(),
xmlreader.creat e(), etc. but they all get the html-output, not the
original xml file.
I downloaded wget for windows just to try it out and it downloaded the
html as well.
The only way I can view the xml is when i go to "View Source" in IE.
Any ideas?
dakrin wrote:
Well, I'm trying to finding a way to programatically do it using c#.
I've tried using xmlDocument.loa d(), getresponsestre am(),
xmlreader.creat e(), etc. but they all get the html-output, not the
original xml file.
I downloaded wget for windows just to try it out and it downloaded the
html as well.
The only way I can view the xml is when i go to "View Source" in IE.
Please post an example URL you are trying to access, if the server sends
HTML after doing an XSLT transformation on the server then it is usually
not possible to access the XML, unless the server exposes that as well.
And if you really get HTML back then XML tools like the Load method of
XmlDocument or XmlReader will simply abort parsing and tell you the
markup is not well-formed XML.
--
Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/
Please post an example URL you are trying to access, if the server sends
HTML after doing an XSLT transformation on the server then it is usually
not possible to access the XML, unless the server exposes that as well.
And if you really get HTML back then XML tools like the Load method of
XmlDocument or XmlReader will simply abort parsing and tell you the
markup is not well-formed XML.
--
Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/
When I do "View Source" in Internet Explorer the XML shows up, so I'm
assuming that means its applying the xsl client side.
Here's an example site that does what i'm talking about : http://armory.worldofwarcraft.com/ar...1&sf=rank&sd=a
dakrin wrote:
When I do "View Source" in Internet Explorer the XML shows up, so I'm
assuming that means its applying the xsl client side.
Here's an example site that does what i'm talking about:
http://armory.worldofwarcraft.com/ar...1&sf=rank&sd=a
The might sniff the user agent server side and depending on that serve
XML or HTML, try it like this
HttpWebRequest httpRequest =
(HttpWebRequest )WebRequest.Cre ate(@"http://armory.worldofw arcraft.com/arena-ladder.xml?b=St ormstrike&ts=3& p=1&sf=rank&sd= a");
httpRequest.Use rAgent =
@"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
HttpWebResponse httpResponse =
(HttpWebRespons e)httpRequest.G etResponse();
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Loa d(httpResponse. GetResponseStre am());
httpResponse.Cl ose();
xmlDocument.Sav e(Console.Out);
that way I get XML starting with
<?xml-stylesheet type="text/xsl" href="/layout/arena-ladder.xsl"?>
<page globalSearch="1 " lang="en_us" requestUrl="/arena-ladder.xml">
It might also be necessary or helpful to set the Accept HTTP request
header but that depends on what they are doing on the server, it is not
really an XML problem but rather a HTTP problem.
--
Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/
dakrin wrote:
On Mar 5, 5:01 pm, Peter Flynn <peter.n...@m.s ilmaril.iewrote :
>wget or dog does it for me.
///Peter
Well, I'm trying to finding a way to programatically do it using c#.
I've tried using xmlDocument.loa d(), getresponsestre am(),
xmlreader.creat e(), etc. but they all get the html-output, not the
original xml file.
I downloaded wget for windows just to try it out and it downloaded the
html as well.
In that case the transformation must be being done server-side.
AFAIK wget does not contain an XSLT processor.
The only way I can view the xml is when i go to "View Source" in IE.
What's the URI?
///Peter
Martin Honnen wrote:
The might sniff the user agent server side and depending on that server
XML or HTML, try it like this
Yep, that worked. Thanks very much :) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: titusjava |
last post by:
I am having a XSLT which transforms an input XML to transformed XML.
I want to get the count of some nodes in the transformed XML, in the
same XSLT.
Is it do able?. Is it possible to read Output XML, in the same XSLT
which perform the transformation.
|
by: gino |
last post by:
Dear all,
My monitor was set to 1600x1200 so the fonts in IE is too small for me even
when I set the "View->Text Size->Largest"...
I don't have previlage to change the monitor resolution...
so I have to try to "hardcode" IE to display any webpage by a scale of
200%...
|
by: Brett |
last post by:
I am writing a program that will allow a user to enter a webpage
address into a form.
Then it will download and display the webpage below the current one.
example
----------------------------------------------------
| _____________ |
| _____________enter web address | Load Button | |
| -------------- |
|___________________________________________________
|
by: Miles Cousens II |
last post by:
I would like to be able to import the following xml document on a daily
basis to get the current exchange rates and then create the same output file
so
I can use Biztalk 2002 to import that file, but I am not sure how to do it?
Any ideas would be greatly appreciated.
http://www.bankofcanada.ca/stat/fx-xml.xml
|
by: GraVity via DotNetMonster.com |
last post by:
Hello all
I am new to asp.net or web programming
I have a requirement, I have to submit a document to another server using
my webpage, there is a perticular protocol for doing that.
This protocol requires to make many requests between the servers for the
submission of single document,
as the result the webpage refreshes many time(for each request between the
servers). I want that some how my webpage doesn't refresh and at the same
time...
| |
by: cybernerdsx2 |
last post by:
Hi,
I am new to XSLT and I would like to use Java to read up the XSLT
content and add in a few tags in into the template below:
<xsl:template name="hwSpecs">
<!-- adding new tags into here from Java -->
</xsl:template>
So, what kind of parser or tools can I use in my Java source code to
|
by: SteveB |
last post by:
I'm porting an application from Apache Xerces to .Net and am having a couple
of small problems with deserialization. The XML that I'm reading comes from
a variety of sources, and there are two inconsistencies that Xerces is able
to handle that XmlSerializer seems not to be able to deal with.
1) Some of the boolean values that I'm dealing with are "True" and "False"
rather than "true" and "false". I'm not quite sure whether "True" and...
|
by: J_Zanetti |
last post by:
Hello everybody,
In my applications I've a ton of scripts that use remote XML file to
fill forms and evaluate contents; In these scripts I always use the
method SelectNode (that, with some workaround, works fine also in
Mozilla).
I've just found out that this method doesnt work in Safari browser,
therefore my applications are not usable by this browser.
Can anyone provide me any solution or workaround to be able to read XML
files in...
|
by: ianoble |
last post by:
I've been trying to piece together various code snippets to create a lookup table inside my xslt without the need for a supplemental xml file. Here is what I have so far. As of now, it does not return anything in the output. I would love to be able to query the xref:factor table to retrieve the value of xref:factor/lookup
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE xsl:stylesheet >
<xsl:stylesheet...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |