newbie: XML

J

Jeff

hey

..NET 2.0

I'm developing an app which each day will try to access an report made in
XML, my app will access it each day and retrieve some values out of this XML
document and store it in a database...

The XML document is on another server somewhere on the Internet

should I use when Stream accessing this xml document??

and lets say if each record in this XML document had a node called
HelloWorld, and this HELLOWORLD node contained a value I had to retrieve.
How would this loop be? any links to exampels are fine

any other suggestions are welcome to :)
 
M

Martin Honnen

Jeff said:
.NET 2.0

I'm developing an app which each day will try to access an report made in
XML, my app will access it each day and retrieve some values out of this XML
document and store it in a database...

The XML document is on another server somewhere on the Internet

should I use when Stream accessing this xml document??

and lets say if each record in this XML document had a node called
HelloWorld, and this HELLOWORLD node contained a value I had to retrieve.
How would this loop be? any links to exampels are fine

The .NET framework has several XML APIs, there is XmlReader for fast,
forwards only pull parsing, there is XPathDocument/XPathNavigator for
XPath based parsing and navigation, there is XmlDocument as the .NET
framework's DOM implementation, there is XML
serialization/deserialization, there is XSLT 1.0 support with
XslCompiledTransform. See
<URL:http://msdn2.microsoft.com/en-us/library/2bcctyt8(VS.80).aspx>
for an overview and for details about these APIs.

Assuming you have HelloWorld elements with simple contents (i.e. text
contents and no child elements) then an XmlReader use to print out the
contents of all HelloWorld elements is as simple as
using (XmlReader reader =
XmlReader.Create(@"http://example.com/file.xml"))
{
while (reader.Read())
{
if (reader.NodeType == XmlNodeType.Element && reader.Name ==
"HelloWorld")
{
Console.WriteLine(reader.ReadString());
}
}
}
 
M

Mr. Arnold

Jeff said:
hey

.NET 2.0

I'm developing an app which each day will try to access an report made in
XML, my app will access it each day and retrieve some values out of this
XML document and store it in a database...

The XML document is on another server somewhere on the Internet


any other suggestions are welcome to :)


You need to make a Upload Soap/XML Web Service on your end, have the server
running an application on its end, the application consumes your Web
Service, and transmits the XML to your Upload Soap/XML Web service.

That's the only way it should happen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top