Re: Import xml file in xml Element

Here, I got one question, you might be able to help me.  Is it possible to import xml file in xml element? For example:

     <name>Harry Potter</name>

-- c:\actress.xml 

 <actor>Daniel Radcliffe</actor>
  <actress>Emma Watson</actress>
 when I read source xml file, it will auto read imported xml file. Is it possible? Thanks


William Chen
8/13/2007 6:27:14 AM 7181 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 17


you may use the asp:Xml control. Check this googled link for more on the asp:xml control...

once you set the source, you may use xslt to design the xml in your page.


Vishal Khanna

(pls mark as answer if reply helps) 

Vishal Khanna
.NET Interviews & FAQs @

Click Mark as Answer if the reply helped you.
8/13/2007 11:05:16 AM

Yes it is. You can use the document() function in XSLT which is used to access the nodes in an external XML document


e.g. document(c:\actress.xml)/store/book/name

In xslt would look somethin like this:


<xsl:stylesheet version="1.0" xmlns:xsl="" xmlns:fo="">
	<xsl:template match="/">
		<xsl:for-each select="document(c:\actress.xml)/store/book/name">
			<xsl:value-of select="."/>

would return :

Harry Potter

If I was helpful, please mark "answered" so I can get credit. Thanks!
8/13/2007 11:06:05 AM

We also can use ENTITY

<!ENTITY variable SYSTEM "target.xml">
William Chen
8/13/2007 10:46:30 PM

Similar Artilces:

XML Transform to 1 XML file to another XML File
Hello All  I am a novice programmer. I want to transform 1 xml file to another xml file. I am looking for a example code where user will select source xml file and create another xml file in different file with different fields with some default validation of parsing date and default values.  Can anyone help me or let me know any available source code in C#/ASP.Net?  Ms Disha I am assuming you know xslt, if not, you would have to go look at that.  But if you do, then this document will help you out

XML in, XML out
Hi All (and a happy holiday to those that will get a break), I am trying to read in an XML file of addresses. I need to remove all the address data from the file where code =~ /^000/ (there are none in the example data below). I need to reproduce that data 'as is', so I need to honour the tag structure, although the order of the tags doesn't need to be honoured. I have been trying to use XML::Simple and I had a go with XML::Smart but I haven't been able to get the results I want. My best effort is below (with XML::Simple). There are a couple of differences ...

XMl to XML
Hello,   I retrieved an XML from the dataset which retrieves data from the table in the database. I need to present the data  in a different structure. Is XSLT the way or are there any other options. please let me know. Thanks!! Yes XSLT is a good choice to convert xml file to other forms. You can take a look at XSLT Tutorial.Sincerely,Young Fang...

XML datasource from external website XML file
Hi all i need to extract some data into a page on my website, but the xml file is on different web server, not in our bunch, but out in the it possible to use this file as a datsource directly, or is there some security issue, and i have to grab it and use it locally...??? the file has been put somewhere it can be accessed with a web browseras this file changes on a daily basis, i would also like to automate the daily retrieval, i'm assuming this is something not too simple either. as you would need a service or something to fire up at a specific time each day?! any he...

Problems writing to an XML file
I'm brand new to using XML (in fact this is my first project), so bear with me, I may need a little hand-holding. I'm trying to create a page which simply adds data to an existing xml file. Ultimately it will add the data from a form, but to keep things simple, I've been simply using pre-defined values. Originally I was able to get the script to write the xml exactly as I needed, however it would simply overwrite the existing file every time it was accessed. This is unacceptable, as it will be used to add data to one file, sort of like a mini database. So after much pain and gnashi...

After download a xml file, why my xml file has been changed?
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click        Dim fileName As String = Server.MapPath("~/Products.xml")        Response.Clear()         Response.ContentType = "text/xml"        Response.AddHeader("Content-Disposition", "attachment; filename=" & fileName)                Response.WriteFile(fileName)  ...

Create an XML file from another XML file
I am using VS 2005 with C#.  I would like to create/generate an xml file from another XML with a differnt structure.  Basically, I want to create the actual xml file for my users whenever they raise my web service method. This is the actual structure of my xml i would like to create the following <Education>  <mydata>    <year>1988 - 1995</year>    <reward>High School Diploma</reward>    <school>Miami Secondary</school>  </mydata>  ...</Education> The original ...

How can i add a xml file to an other xml file?
such as i have a xml file : <item1> <item2> <item3>aaa</item3> <item4>bbb</item4> </item2> <item1> an other one is: <item2> <item3>ccc</item3> <item4>ddd</item4> <item2> i wanted is: <item1> <item2> <item3>aaa</item3> <item4>bbb</item4> </item2> <item2> <item3>ccc</item3> <item4>ddd</item4> <item2> <item1> thanks. You ca...

Xml Schema from xml file
How should i create xml schema from xml file?  Do you mean an XSD?  That's easy--open the XML file in Visual Studio.  There will be a new XML menu button, and one option is to create an XSD.  If you have a lot of files, MS has a little tool at my post is your answer, please mark it as the answer. It will bring good karma.Crystal AllianceMy BlogFlorist Blogs  Thanks alot!!  It worked wonderfully...

Xml schema to Xml file
Is it possible to convert xml schema to xml file.How can i do read&writexmlschema using a dataset with xml schema. I converted a xml file to xml schema in a web appliction project.Then what should be location of shema that i need to give for a dataset I mean dataset.readxmlscheme(server.mappath(??))   Please let me know I am new to this field     dataset.ReadXml(Server.MapPath("xml\ProductList.xml")) will read the xml as well as the schema of thexml file. no need to convert it into schema file while using dataset as it will automatically define the ...

Load XMl file and read xml file
How do I load and read nodes from the xml file in c#.??? ThankYou Sample code: Yang.NET Developer Here is how you read xml file and loop and display nodesXmlDocument xDoc = new XmlDocument();xDoc.Load(xmlPath); foreach(XmlNode node in xDoc.SelectNodes("//nodeName you want to display")){Response.Write("name: " + node.Attributes["name"].InnerText + " value: " + node.Attributes["value"].InnerText);}...

Splitting XML file to different XML files
hi,I have xml file that represent a table , one of the element(column) of the xml represent category..I want to split the xml file to different xml files base on the categories (each xml file will represent different category).The question is , if it posible to split the original xml using one xslt file, or i must create different xslt file for each category?thanks in advance one xslt for each output.You can also do this with XmlDocument and save it to two seaprate paths.HTHRegards,Rob...

XML content in a XML file
I have a requirement where I want to retrieve data from XML file.The concern is the data that has to be retrieved, it is again a XML data.e.g the following format is required<Gorups>   <Gorup>      <value>Some XML content</value>   </Gorup></Gorups>Thanks in advance Hello  Deepasmi, Are you facing problem in retrieval of specific xml node from xml file. Still problem is unclear.My Blog: DotNetError@BhatiaWorldDont forget to click "Mark as Answer" on the post that helped you.T...

------_=_NextPart_001_01C6E0D0.3E27D77A Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Hi Craig and fellow VMS Perlers, You last wrote about this Fri 3/16/2001 11:24 AM, not counting your very helpful comments on Eisner/Decuserve more recently. One of my colleagues sent me an email requesting that I make XML::XSLT=20 available on VMS. perl 5.8.6, VMS 7.3-2, DECC 7.1 latest ACRTL (version 3) on Alpha XML::XSLT (version 0.48) depends on XML::Parser (version 2.34). This depends on expat (version 2.0.0). I built expat a...

Web resources about - Re: Import xml file in xml Element -

Éléments de géométrie algébrique - Wikipedia, the free encyclopedia
The Éléments de géométrie algébrique ("Elements of Algebraic Geometry ") by Alexander Grothendieck (assisted by Jean Dieudonné ), or EGA for ...

Ravenswood speech: Principal praises speech despite ‘element of vendetta’
SARAH Haynes received a standing ovation following her farewell speech as Ravenswood captain, where she claimed the elite Sydney school’s reputation ...

Mystery of the Moon's missing volatile elements finally solved
A new model is developed solving the last remaining major questions about the birth of the Earth's Moon.

Top Picks from John O'Connell: Facebook, Element Financial and Cisco Systems
Top Picks from John O'Connell: Facebook, Element Financial and Cisco Systems The economy is expanding moderately in North America but ...

New model explains how the Earth stole the Moon’s lighter elements
... by the idea that the two formed from the shared debris of a collision between the early Earth and a Mars-sized body. But there are some elements ...

Human element is key to effective use of analytics
... a strong enough differentiating factor among organizations companies must invest in people and recognize the importance of the human element ...

Adobe Photoshop Elements & Premiere Elements 14: Half off on Amazon for one day only
... brand is synonymous with quality. While Adobe software can often be very pricey, Amazon is hosting a one-day-only sale on Adobe Photoshop Elements ...

An ex-Facebook exec just launched a $70 million fund for startups with 'data as a core element'
... devices. He says: "I don’t want to call ourselves a data fund, but a lot of the stuff we end up getting excited about has data as a core element. ...

There's a new $70 million fund looking to back startups with 'data as a core element'
... devices. He says: "I don’t want to call ourselves a data fund, but a lot of the stuff we end up getting excited about has data as a core element. ...

DeBoer breaks down key elements: 'That was the story'
... Search 52° Navigation Home Giants A's Sharks Warriors Kings 49ers Raiders Quakes Insiders More Tickets Shop Watch DeBoer breaks down key elements: ...

Resources last updated: 12/24/2015 10:23:39 PM