Group:  General ยป microsoft.public.office.xml
Thread: Split an XML Field In an MS Word Smart Document

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Split an XML Field In an MS Word Smart Document
Jason N. Gaylord 08.12.2005 20:39:02
I'm creating a report using a predefined XML Schema provided by Microsoft for
a Small Business Accounting report. I can't modify the Schema. Is there a way
within Word that I can take a field like <Description> and parse the data
into a few variables for use in the same record. The difficult part is there
are multiple rows containing a description tag in each row.

Thanks in advance!

--
Jason N. Gaylord
Microsoft MVP, ASPInsider
www.JasonGaylord.com
jason[ at ]<Remove-This-Before-Sending>jasongaylord.com
Re: Split an XML Field In an MS Word Smart Document
Cindy M -WordMVP- <C.Meister-C[ at ]hispeed.ch> 11.12.2005 16:56:56
Hi =?Utf-8?B?SmFzb24gTi4gR2F5bG9yZA==?=,

[Quoted Text]
> I'm creating a report using a predefined XML Schema provided by Microsoft for
> a Small Business Accounting report. I can't modify the Schema. Is there a way
> within Word that I can take a field like <Description> and parse the data
> into a few variables for use in the same record. The difficult part is there
> are multiple rows containing a description tag in each row.
>
I guess that depends to a certain extent on what you're doing with the data. But
in a general way, I'd think it would be possible, by automating Word, to extract
the node's content and display it in separate cells.

If this SmartDocument is also supposed to save data for extraction, you'll
probably need to automate again to put the data back into the tag before closing
the document. Or, possibly, you could keep it all in the tag (formatted to not
be visible in the document) and just use automation to make it appear in the
table cells.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)

Re: Split an XML Field In an MS Word Smart Document
Jason N. Gaylord 13.12.2005 14:13:02
Cindy,

It doesn't need to. It's a Word Doc utilizing the Office 2003 XML Add-In. I
just need to split one of the XML fields at a delimeter. Have any idea how to
do that?

--
Jason N. Gaylord
Microsoft MVP, ASPInsider
www.JasonGaylord.com
jason[ at ]<Remove-This-Before-Sending>jasongaylord.com


"Cindy M -WordMVP-" wrote:

[Quoted Text]
> Hi =?Utf-8?B?SmFzb24gTi4gR2F5bG9yZA==?=,
>
> > I'm creating a report using a predefined XML Schema provided by Microsoft for
> > a Small Business Accounting report. I can't modify the Schema. Is there a way
> > within Word that I can take a field like <Description> and parse the data
> > into a few variables for use in the same record. The difficult part is there
> > are multiple rows containing a description tag in each row.
> >
> I guess that depends to a certain extent on what you're doing with the data. But
> in a general way, I'd think it would be possible, by automating Word, to extract
> the node's content and display it in separate cells.
>
> If this SmartDocument is also supposed to save data for extraction, you'll
> probably need to automate again to put the data back into the tag before closing
> the document. Or, possibly, you could keep it all in the tag (formatted to not
> be visible in the document) and just use automation to make it appear in the
> table cells.
>
> Cindy Meister
> INTER-Solutions, Switzerland
> http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
> 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 :-)
>
>
Re: Split an XML Field In an MS Word Smart Document
Cindy M -WordMVP- <C.Meister-C[ at ]hispeed.ch> 13.12.2005 16:59:35
Hi =?Utf-8?B?SmFzb24gTi4gR2F5bG9yZA==?=,

[Quoted Text]
> It doesn't need to. It's a Word Doc utilizing the Office 2003 XML Add-In. I
> just need to split one of the XML fields at a delimeter. Have any idea how to
> do that?
>
If the field isn't in the schema, you can't do it. There is no such thing as an
XML node / element / field in a Word document without a supporting schema.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)

Re: Split an XML Field In an MS Word Smart Document
Jason N. Gaylord 13.12.2005 21:50:07
Cindy,

The field is in the schema. I need to split the value of a field in the
schema in the smart doc.

--
Jason N. Gaylord
Microsoft MVP, ASPInsider
www.JasonGaylord.com
jason[ at ]<Remove-This-Before-Sending>jasongaylord.com


"Cindy M -WordMVP-" wrote:

[Quoted Text]
> Hi =?Utf-8?B?SmFzb24gTi4gR2F5bG9yZA==?=,
>
> > It doesn't need to. It's a Word Doc utilizing the Office 2003 XML Add-In. I
> > just need to split one of the XML fields at a delimeter. Have any idea how to
> > do that?
> >
> If the field isn't in the schema, you can't do it. There is no such thing as an
> XML node / element / field in a Word document without a supporting schema.
>
> Cindy Meister
> INTER-Solutions, Switzerland
> http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
> 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 :-)
>
>
Re: Split an XML Field In an MS Word Smart Document
Cindy M -WordMVP- <C.Meister-C[ at ]hispeed.ch> 14.12.2005 14:18:21
Hi =?Utf-8?B?SmFzb24gTi4gR2F5bG9yZA==?=,

[Quoted Text]
> The field is in the schema. I need to split the value of a field in the
> schema in the smart doc.
>
We're going around in circles :-) Read my first reply... You have to pick
up the content of the node in the Word document, programmatically, then
put it somewhere else (another cell, or whatever). If you're asking how
you can parse the string you get into a multiple parts, look at the SPLIT
(and JOIN) functions (in the Visual Basic Help section; these functions
are common to Office, not Word-specific).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net