Merging/Linking XML files?

This is a multi-part message in MIME format.

------=_NextPart_000_001C_01C35777.BB482CA0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have an XML document that is linked to other document and I can't =
figure out what the best way to try and merge them before query qith an =
XpathNavigator.

Simple example...a root xml document contains the root folder that can =
contain items and other folders. The other folders can either live in =
the root document or be in other xml files completely (to make it easier =
for multiple developers/processes to work on the data at the same time.)

I think the developer that was doing it before was using xlink or =
xpointer to see if the folder had an href attribute and then called some =
script to open the document and merge it with the parent creating one =
big tree (to query later).

Does anyone know what the best way to do this in .Net would be? I think =
i could do it running the intial file through XSLT and use the =
document() function but I'm wondering if there is a better way to do =
this.

Thanks,

Cy Huckaba
Austin, TX


rootFolder.xml ******************

<folder name=3D"rootFolder">
    <item name=3D"a" />
    <item name=3D"b" />
    <item name=3D"c" />

    <folder name=3D"thingys">
        <item name=3D"ta" />
        <item name=3D"tb" />
    </folder>
   =20
    <folder name=3D"widgets" href=3D"widgets.xml"></folder>
   =20
    <item name=3D"d" />

</folder>

widgets.xml *****************************

    <item name=3D"wa" />
    <item name=3D"wb" />
    <item name=3D"wc" />
   =20
    <folder name=3D"widgets">
        <item name=3D"wwa" />
        <item name=3D"wwb" />
    </folder>
   =20
    <item name=3D"wd" />
------=_NextPart_000_001C_01C35777.BB482CA0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I have&nbsp;an XML document that is =
linked to other=20
document and I can't figure out what the best way to try and merge them =
before=20
query qith an XpathNavigator.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Simple example...a root xml document =
contains the=20
root folder that can contain items and other folders. The other folders =
can=20
either live in the root document or be in other xml files completely (to =
make it=20
easier for multiple developers/processes to work on the data at the same =

time.)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I think the developer that was doing it =
before was=20
using xlink or xpointer to see if the folder had an href attribute and =
then=20
called some script to open the document and merge it with the parent =
creating=20
one big tree (to query later).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Does anyone know what the best way to =
do this in=20
..Net would be? I think i could do it running the intial file through =
XSLT and=20
use the document() function but I'm wondering if there is a better way =
to do=20
this.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Cy Huckaba</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Austin, TX</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>rootFolder.xml =
******************</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;folder =
name=3D"rootFolder"&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &lt;item name=3D"a"=20
/&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &lt;item name=3D"b"=20
/&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &lt;item name=3D"c"=20
/&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &lt;folder=20
name=3D"thingys"&gt;</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;item=20
name=3D"ta" /&gt;</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;item=20
name=3D"tb" /&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;=20
&lt;/folder&gt;</FONT></DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &lt;folder =
name=3D"widgets"=20
<STRONG>href=3D"widgets.xml"</STRONG>&gt;&lt;/folder&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &lt;item name=3D"d"=20
/&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;/folder&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>widgets.xml=20
*****************************</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &lt;item name=3D"wa" =
/&gt;</FONT>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &lt;item name=3D"wb" =

/&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &lt;item name=3D"wc" =

/&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &lt;folder=20
name=3D"widgets"&gt;</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;item=20
name=3D"wwa" /&gt;</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;item=20
name=3D"wwb" /&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&lt;/folder&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &lt;item name=3D"wd" =

/&gt;</FONT></DIV></DIV></BODY></HTML>

------=_NextPart_000_001C_01C35777.BB482CA0--

0
russellh1 (3)
7/31/2003 8:23:45 PM
dotnet.xml 7266 articles. 0 followers. Follow

2 Replies
450 Views

Similar Articles

[PageSpeed] 26

Cy Huckaba wrote:

> I have an XML document that is linked to other document and I can't 
> figure out what the best way to try and merge them before query qith an 
> XpathNavigator.
>  
> Simple example...a root xml document contains the root folder that can 
> contain items and other folders. The other folders can either live in 
> the root document or be in other xml files completely (to make it easier 
> for multiple developers/processes to work on the data at the same time.)
>  
> I think the developer that was doing it before was using xlink or 
> xpointer to see if the folder had an href attribute and then called some 
> script to open the document and merge it with the parent creating one 
> big tree (to query later).
>  
> Does anyone know what the best way to do this in .Net would be? I think 
> i could do it running the intial file through XSLT and use the 
> document() function but I'm wondering if there is a better way to do this.

There is standard way of doing that - XInclude [1]. Then you can have the 
following in your document:
<xi:include href="widgets.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
This will include the whole widgets.xml, or
<xi:include href="widgets.xml#xpointer(//folder[@name='widgets'])" 
xmlns:xi="http://www.w3.org/2001/XInclude"/>
to include only specified elements.
The plumbing to process it under .NET you can find at GotDotNet, in 
XInclude.NET workspace [2]. It provides XIncludingReader class, which 
implements XmlReader so can be used everywhere. Just read your XML via this 
reader and don't care about underlying including and merging.

[1] http://www.w3.org/TR/xinclude
[2] 
http://gotdotnet.com/Community/Workspaces/Workspace.aspx?id=cab253e8-cb4b-47c4-a9d9-6c42947b04a8
-- 
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

0
oleg7603 (294)
8/3/2003 9:31:55 AM
Thanks Oleg, I'm looking into it now.

Also, I liked your Extreme XML article on MSDN. Nice to see that authors are
still helping with the newgroups.

Thanks again,

Cy



"Oleg Tkachenko" <oleg@NO_SPAM_PLEASEtkachenko.com> wrote in message
news:#YmdxkZWDHA.1480@tk2msftngp13.phx.gbl...
> Cy Huckaba wrote:
>
> > I have an XML document that is linked to other document and I can't
> > figure out what the best way to try and merge them before query qith an
> > XpathNavigator.
> >
> > Simple example...a root xml document contains the root folder that can
> > contain items and other folders. The other folders can either live in
> > the root document or be in other xml files completely (to make it easier
> > for multiple developers/processes to work on the data at the same time.)
> >
> > I think the developer that was doing it before was using xlink or
> > xpointer to see if the folder had an href attribute and then called some
> > script to open the document and merge it with the parent creating one
> > big tree (to query later).
> >
> > Does anyone know what the best way to do this in .Net would be? I think
> > i could do it running the intial file through XSLT and use the
> > document() function but I'm wondering if there is a better way to do this.
>
> There is standard way of doing that - XInclude [1]. Then you can have the
> following in your document:
> <xi:include href="widgets.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
> This will include the whole widgets.xml, or
> <xi:include href="widgets.xml#xpointer(//folder[@name='widgets'])"
> xmlns:xi="http://www.w3.org/2001/XInclude"/>
> to include only specified elements.
> The plumbing to process it under .NET you can find at GotDotNet, in
> XInclude.NET workspace [2]. It provides XIncludingReader class, which
> implements XmlReader so can be used everywhere. Just read your XML via this
> reader and don't care about underlying including and merging.
>
> [1] http://www.w3.org/TR/xinclude
> [2]
>
http://gotdotnet.com/Community/Workspaces/Workspace.aspx?id=cab253e8-cb4b-47c4-a
9d9-6c42947b04a8
> --
> Oleg Tkachenko
> http://www.tkachenko.com/blog
> Multiconn Technologies, Israel
>


0
russellh1 (3)
8/4/2003 10:50:19 PM
Reply:

Similar Artilces:

merging
Is it possible to create a document in publisher (mine is a certificate) and then merge the desired information from a select querry in access? Hi Tina (sttpreston@clyde.k12.oh.us), in the Microsoft� newsgroups you posted: || Is it possible to create a document in publisher (mine is || a certificate) and then merge the desired information from || a select querry in access? Yes, you can. Which version of Publisher and Windows are you using? -- Brian Kvalheim Microsoft Office Publisher MVP Official Publisher MVP Site: http://www.kvalheim.org This posting is provided "AS IS" wit...

Outlook 2003 PRF File
Hi, Does anyone know if it is possible to set-up multiple profiles in a PRF files. We have a document management product that required a second profile in order to interact and so when Outlook is started we would like it to set-up the user profile and this additional profile, so 2 profiles. I know that you can set-up multiple services but we would like to have multiple profiles. Thanks, -- Jonathan Thomas Hampshire County Council Each PRF file can set up only one profile, and Outlook can process only one PRF file per Outlook session. Therefore, you can do this, but it will require ...

links not updating although autocalc is On?
Hi My very large workbook has developed a strange problem that cell references from one sheet to another have stopped updating. e.g. if data is entered on one sheet it will not update linked cells in other sheets. Stragely, if I recreate the link - which is precisely the same- it works once but then becomes 'frozen' and will not update if the data is changed. Would be grateful if someone could help me remove this critical spanner from my works. Thanks Keith maybe, just maybe, if you do: Edit|replace what: = (equal sign) with: = (equal sign) replace all it'll wake excel up...

Merge same transaction
I've had transactions that I've placed in my register with detailed info in the memo area only to have the same exact transaction download with no info and unrecognized as the same transaction. Traditionally I've copied and pasted the info into the downloaded transaction and then deleted my transaction. This is a real PAIN... Is there a way to tell Money that these two separate transactions are the SAME transaction and then have it merge them? It works exactly as intended when Money recognizes the transaction that's already in the register and then merges them beautiful...

Linking Cells: Excel into Word Document
Greetings, After reading through the help files for Excel 2002, it seems to me that there is no way, except for programming, to have just a range of cells in a worksheet be linked to a Word document. Here is what I am attemping to accomplish: Using Word to create an extensive document for a database proposal. Using Excel to document the all of the required tables (since nothing has been created in Acces and I am new databases), drawing diagrams with lines and other database objects. Would like to be able to insert/link certain cells from a worksheet (which would be many inserts/links) into t...

Outlook 2010
In Outlook 2003 I had one .pst file with all contacts inside, but used 3 email accounts with no automatic rules for mail delivery. I manually put the emails down in it's respective archive.pst files and want it done this way. In Outlook 2010 when using several email accounts, it's automatically established one .pst file for each email account where the respective email drops into. Is there a way to have it all into one "Personal Folder" (the old way)? (I want to send emails were sender account is the only on showing as sender and not any "sent on behalf ...

Merging 2 Companies into 1
Are there any guidelines or outline for what tables you need to look at to gather the various information you need in order to merge 2 companies together as well as issues to consider when undertaking such a project? It is a project and a half. I got approval from a major client yesterday to proceed with just this project. You literally need to look at all of them! I understand that MS Professional Services will do this project for you. In my case the client cannot be down and has too many 3rd party products for us to pass it off. When does your project need to be completed? -- Ri...

Excel "file is already open"
Whenever I open a '.xls' workbook from outside Excel (such as from Windows Explorer), Excel indicates that the file is already open - although, once I click OK, I seem to be able to work with the file normally. The same file will open fine from within Excel. I am using Excel 97 on an XP-Home machine. Can you explain why I may be getting this message, and how I might correct for it? The FAQ at Debra Dalgleish's site might give the solution: http://www.contextures.com/xlfaqApp.html#AlreadyOpen John McFadden wrote: > > Whenever I open a '.xls' workbook from ...

Word mail merge
After printing a document there exists a activity with subject "Word Mail Merge" to the contact with status completed. Is there a possibility to change the subject name or to make a link to the original Word document? R, Joop. I think that the subjct name is hardcoded. The issue of only adding this paltry information to the activity and not showing what document was sent is a problem many have asked about. Microsofts workaround to this glaring gap in functionality is to then add a copy of the word document to the record using notes. Totally unworkable if you have just mail merg...

Mass Re-linking of Broken Excel 2000 and 2003 Files
We are moving customer files to a different server and have several individuals who have MANY linked Excel 2000 and 2003 files to other Excel files. I am getting pressure from some individuals on finding a tool to re-link moved files more easily than on a one-by-one basis when they are opened. Does anyone know of anything like this? Have a look in Help at Worbook.ChangeLink HTH -- AP "Lynn" <Lynn@discussions.microsoft.com> a �crit dans le message de news: 88648722-5AC2-4C38-8536-ED7A405F095E@microsoft.com... > We are moving customer files to a different server and...

Linked Cells #8
How do I have a link jump to the linked cell vs. showing me the contents? Without knowing exactly what you're asking, you need to hyperlink the cell you want to jump from, select Bookmark, and then enter the Cell reference that you want to jump to. "Jill" <Jill@discussions.microsoft.com> wrote in message news:227A882B-189A-4BE3-AEAE-A5C0CF6EF751@microsoft.com... > How do I have a link jump to the linked cell vs. showing me the contents? ...

mail merge/merging 2 address lists...
Is there a way to merge two of your address lists in Publisher 2002? I have two address lists in my data base folder and would like all the addresses merged into one as there are some addresses different in each and some the same. Thank you. Robin Hi Robin (vicary@kconline.com.NOSPAM), in the Microsoft� newsgroups you posted: || Is there a way to merge two of your address lists in Publisher 2002? || I have two address lists in my data base folder and would like all || the addresses merged into one as there are some addresses different || in each and some the same. No, you cannot. You nee...

Can I save application as .exe file
I have created several successful Access applications in the past. I need an application that can be maintained on several different computers which may not all have MS Office installed. Can I put the complete database on a CD so different people can update the data? I guess that this means the application would have to be a .exe file and maybe use CD-RW CDs so it can be written to on different computers. Really Gone There's never been an ability to create an executable from an Access database, and I wouldn't expect there ever to be such a capability. Take a look a...

merge and compare
We have two versions of the same work sheet from differnt dates. Some of the cells have been changed in the latest version and we need to compare which cells have had changes and selectively merge the two. Is there any hope??? jimired wrote: > We have two versions of the same work sheet from differnt dates. > > Some of the cells have been changed in the latest version and we need > to compare which cells have had changes and selectively merge the two. > > Is there any hope??? Hi have a look at http://www.cpearson.com/Zips/Compare.ZIP An add-in which compares two worksh...

Error: While executing Check Links
Hi.. I am facing a problem while executing Check Links in File - -> Maintenance for Budget Master . The error is " A get/change first operation on table 'GL_Budget_Sum_Mstr' failed accessing SQL data". When i click on more info the following message is displyed. "Number of results columns doesnt match table definition." Can anyone suggest me what should i do... Thanks Thanks for the help. It was a problem with my workstation and has been resolved. >-----Original Message----- >How did you create your budget info. Did you use the excel budgeting ...

Updating Excel Files
I am a novice user of excel and need a little help. I am using spreadsheet to update my websites inventory levels. I receive a inventory update file from my supplier once a day. The problem is don't sell all of the items in that file. eg My File 1 ---- Suppliers File BDDTTH ---- 100001 BDGBB ---- 100011 BDGCJ ---- 1099211 BDGJCS ---- BDGJCS BDGJGL ---- BDJGL BDLB-BD38 ---- BDDTH What I need to do is compare the part numbers and if I get a matc update the inv...

Create filtered dataset from XML file?
I need to create a Dataset and datatable from an XML file. The only way I know how to make a Dataset and Datatable, is by using an Access database as my datastore: You know, the usual thing in all the books; an OleDbDataAdapter, with a SQL string and connection. How can I do this using an XML file instead of an Access table? I know I can convert an XML file straight into a Dataset. But the dataset always contains ALL the info from the XML file. I want the dataset to be filtered by using some sort of query. A couple years ago I hurt my brain figuring out Xpath. Boy, i'm just not mea...

Office Links
Hello, I have a simple report which has a field which come from a memo field. In the report all is good. All the data appear. However, when i use the OfficeLinks, 'Analyze it with Microsoft Office Excel' and it does the transfer, the memo field gets truncated. Why? Is there a simple fix or do I need to perform an export on the underlying query? Thank you, QB Hi QB, Yes, you will need to export the underlying query: Memo field is truncated when you output a report to excel http://support.microsoft.com/kb/294286 While the title of this article includes "in Ac...

How can I get bar codes w/ Excel & mail merge?
I want to send out a bulk mailing with large postcards. I want the addresses printed on the postcards via mail merge. I am using Excel, but don't see where or how to add the bar code to the address, which would save me a lot of money. Can you help? >-----Original Message----- >I want to send out a bulk mailing with large postcards. I want the addresses >printed on the postcards via mail merge. I am using Excel, but don't see >where or how to add the bar code to the address, which would save me a lot of >money. Can you help? >. > hi, I not entirely...

Visio 2003, Database linking, Space Plans
Visio 2003, or at least my lack of knowledge about Visio 2003 is driving me insane! I have what I thought would be a fairly simple project, that is turning into a nightmare. I would appreciate any help anyone could give about linking a database to a Visio 2003 space plan. Below I have outlined what I have, what I want, and what I've tried. If someone could point out where I am going wrong I would be really pleased. ***What I have*** 1. A SQL database which contains computer equipment assets. There is a main Asset table which contains a record for each asset along with some purchasing ...

GP Help Files
Hi everybody - we have some custom windows in GP 10, and we would like to add some custom help items under the (?) help in the top right hand corner - how can I add a menu item there that will point to my documentation? ...

Merging worksheet into MS Word mail merge
I am merging a letter and an Excel worksheet. When I merge an Excel field that contains $ and commas separating the hundreds and thousands, the $ and the , do not show up in the merged letter. Any suggestions on how to solve this problem? -- Briggs Hi Instead of just referring to the cell e.g. A1 use =TEXT(A1,"[$$-409]#,##0.00") -- Regards Roger Govier "Briggs" <Briggs@discussions.microsoft.com> wrote in message news:2F326201-A50F-45E5-9767-4C189ACA5529@microsoft.com... > I am merging a letter and an Excel worksheet. When I merge an Exc...

Error in Mail Merge when selecting Edit Individual Labels
We are noticing an interesting error when trying to perform a mail merge within CRM and Microsoft Word. We have created a view in contacts and we perform all the typical mail merge functionality using the Labels option. At the end, instead of printing the labels without any edits, we click on “Edit Individual labels” and we get the following error… C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE has encountered a problem and needs to close. We are sorry for the inconvenience. We are on CRM v4 Update Rollup 8 using Outlook 2007 and the CRM Outlook (Online only) client. Has an...

Outlook 2002
I was able to click on a web link in an email and IE would automatically start and open the linked web page. Today when I clicked on a link an empty IE window opened and a I was asked to provide a path to a link browser. Now when I click on a link in a message an empty IE window opens along with the IE window with the proper web page. Anyone have an idea how to fix this problem? Thanks, Cliff Browse to the folder for your browser and locate the executable. Double click on it and the prompts should go away. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the di...

Help needed with opening an Excel file from an embedded excel application.
Hello, I have a SDI MFC application that uses the following code to create an empty embedded excel 2003 application: (Extracted from http://support.microsoft.com/kb/311546) void CEmbed_ExcelView::EmbedAutomateExcel() { //Change the cursor so that the user knows that something exciting is going //on. BeginWaitCursor(); CEmbed_ExcelCntrItem* pItem = NULL; TRY { //Get the document associated with this view, and be sure that it is //valid. CEmbed_ExcelDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); //Create a new item associated with this document, and be sure that //it is val...