Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Hafeez Esmail Hafeez Esmail is offline
external usenet poster
 
Posts: 4
Default Viewing and Parsing XML files

I'm using Word 2003.
My XML files are defined as follows:
Record
AccountInfo
TransactionInfo
ProductInfo
There are multiple sub-tags, and sub-sub-tags within the ones I've listed,
but let's ignore them for the time being.
1) How do I open the document in Word and show the tags as they would
appear in Notepad? Some of the information in the XML file is not showing
because it's hidden in the tag name. For example...Record id="1" is what
appears in NotePad, but only a Tag Named "Record" appears in Word.
2) Is there a quick way for me to Isolate all of the details associated with
(for example) Record numbers 3, 9, 14, and 45, and place that information
(copying the exact same struture) in a new file?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Bob Buckland ?:-\) Bob   Buckland ?:-\) is offline
external usenet poster
 
Posts: 2,073
Default Viewing and Parsing XML files

Hi Hafeez,

Generally, the ID= attribute wouldn't appear. In Word 2003 the capabilities for XML documents vary. Full support of external
Schemas/XSLT is provided in standalone Word and Word in the Professional Edition. You can defined a Schema and attach it to the
XML pane using the dialog accessed under
Tools=Templates and Addins (Alt, T, I).

The XML Structure Task Pane (View=TaskPane) will let you navigate the structure of the record content.

If you want to work on the raw XML data you can use
Tools=Options=General
and turn on
[x] Confirm Conversions at Open
then when you open the XML file choose Text file rather than XML document as the file type, but opening the .XML file in an XML
Editor will usually be easier to work with.

================
"Hafeez Esmail" wrote in message
...
I'm using Word 2003.
My XML files are defined as follows:
Record
AccountInfo
TransactionInfo
ProductInfo
There are multiple sub-tags, and sub-sub-tags within the ones I've listed,
but let's ignore them for the time being.
1) How do I open the document in Word and show the tags as they would
appear in Notepad? Some of the information in the XML file is not showing
because it's hidden in the tag name. For example...Record id="1" is what
appears in NotePad, but only a Tag Named "Record" appears in Word.
2) Is there a quick way for me to Isolate all of the details associated with
(for example) Record numbers 3, 9, 14, and 45, and place that information
(copying the exact same struture) in a new file?
--
Please let us know if this has helped,

Bob Buckland ?:-)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends


LINKS
A. Specific newsgroup/discussion group mentioned in this message:
news://msnews.microsoft.com/microsoft.public.office.xml
or via browser:
http://microsoft.com/communities/new...lic.office.xml

B. MS Office Community discussion/newsgroups via Web Browser
http://microsoft.com/office/communit...s/default.mspx
or
Microsoft hosted newsgroups via Outlook Express/newsreader
news://msnews.microsoft.com



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Hafeez Esmail Hafeez Esmail is offline
external usenet poster
 
Posts: 4
Default Viewing and Parsing XML files


Thanks Bob.
The Confirm Conversion on Open really did the trick....
I'm thinking there must be some tools out there (VB classes, methods) that
would greatly help me parse through this XML document and extract the items
I'm looking for....
But in the mean time, I suppose I can treat the XML document as a text file
(what a shame!) and do try it out that way.

Thanks,

"Bob Buckland ?:-)" wrote:

Hi Hafeez,

Generally, the ID= attribute wouldn't appear. In Word 2003 the capabilities for XML documents vary. Full support of external
Schemas/XSLT is provided in standalone Word and Word in the Professional Edition. You can defined a Schema and attach it to the
XML pane using the dialog accessed under
Tools=Templates and Addins (Alt, T, I).

The XML Structure Task Pane (View=TaskPane) will let you navigate the structure of the record content.

If you want to work on the raw XML data you can use
Tools=Options=General
and turn on
[x] Confirm Conversions at Open
then when you open the XML file choose Text file rather than XML document as the file type, but opening the .XML file in an XML
Editor will usually be easier to work with.

================
"Hafeez Esmail" wrote in message
...
I'm using Word 2003.
My XML files are defined as follows:
Record
AccountInfo
TransactionInfo
ProductInfo
There are multiple sub-tags, and sub-sub-tags within the ones I've listed,
but let's ignore them for the time being.
1) How do I open the document in Word and show the tags as they would
appear in Notepad? Some of the information in the XML file is not showing
because it's hidden in the tag name. For example...Record id="1" is what
appears in NotePad, but only a Tag Named "Record" appears in Word.
2) Is there a quick way for me to Isolate all of the details associated with
(for example) Record numbers 3, 9, 14, and 45, and place that information
(copying the exact same struture) in a new file?
--
Please let us know if this has helped,

Bob Buckland ?:-)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends


LINKS
A. Specific newsgroup/discussion group mentioned in this message:
news://msnews.microsoft.com/microsoft.public.office.xml
or via browser:
http://microsoft.com/communities/new...lic.office.xml

B. MS Office Community discussion/newsgroups via Web Browser
http://microsoft.com/office/communit...s/default.mspx
or
Microsoft hosted newsgroups via Outlook Express/newsreader
news://msnews.microsoft.com




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Viewing and Parsing XML files

Hi ?B?SGFmZWV6IEVzbWFpbA==?=,

The Confirm Conversion on Open really did the trick....
I'm thinking there must be some tools out there (VB classes, methods) that
would greatly help me parse through this XML document and extract the items
I'm looking for....
But in the mean time, I suppose I can treat the XML document as a text file
(what a shame!) and do try it out that way.

The problem with any XML file is that the structure is arbitrary. So there's
really nothing like a "viewer" that can show you something for editing (as you
could an Excel worksheet, for example).

For "classic VB" (including VBA) you can set a reference to an MSXML library
(if nothing else, one is distributed with Office 2003) to get XML parsing
classes and methods. The .NET applications have those built-in. The Microsoft
Visual Studio "Express" editions - VB.NET Express, for example - are free
downloads.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parsing out text? JSpence2003 Microsoft Word Help 1 May 7th 08 02:37 PM
Viewing .mdi files in Office 2007 JU-Vista Microsoft Word Help 5 September 11th 07 03:02 AM
Viewing XPS files ToddLC Microsoft Word Help 1 June 6th 07 12:57 PM
viewing files saved on microdrive only recently if lost drive? krakaboi Microsoft Word Help 1 April 18th 06 06:51 AM
Newbie question: Parsing a line Rhino Microsoft Word Help 2 January 26th 06 10:51 PM


All times are GMT +1. The time now is 10:42 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"