xml attributes

F

Fermo Vignetti

someone knows how to display the xml attributes of all tags of a document.
I know that is possible to view the attributes by mean attributes dialog,
but i need the attributes are displayed in the main document (near or below
tag)
Thanks
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?RmVybW8gVmlnbmV0dGk=?=,
someone knows how to display the xml attributes of all tags of a document.
I know that is possible to view the attributes by mean attributes dialog,
but i need the attributes are displayed in the main document (near or below
tag)
Hard to think about a problem if we don't even know which application is
meant? I'm guessing Word 2003?

No, there's no way to get Word 2003 to display attributes in the document
window, short of using a Transform when you open the XML file to put the
attribute information into the text, or into new elements.

XML in Word was NOT designed to make Word an XML editor. It's there to help
developers create SmartDocuments. That's it. It can be used for data entry,
but then you have to live with the interface.

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 :)
 
F

Fermo Vignetti

Thanks very much, Cindy for your answer
Sorry, the application is WORD :)))..
I have tryed with comments.
For each xml node i have created a comment containing the attributes of the
node.
The problem is that the comment shows the word 'comment [xxx]' and is not
possible to hide it.
Someone has suggested shapes, but that is more difficult than comments.

Fermo
 
C

Cindy M -WordMVP-

Hi Fermo,

Could you explain what you want to have happen with the attributes? And with
the entire document? Should the user just be reading, be editing...?

Also, which programming environment are you using?
Sorry, the application is WORD :)))..
I have tryed with comments.
For each xml node i have created a comment containing the attributes of the
node.
The problem is that the comment shows the word 'comment [xxx]' and is not
possible to hide it.
Someone has suggested shapes, but that is more difficult than comments.

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 :)
 
F

Fermo Vignetti

Hi Cindy,
thanks very much for your answer.
first of all i apologize for my english, i hope you will understand.

What i want is:
display in the document, near each tag or in the xml structure (task pane)
the attributes of each xml node. In this way the user can see all the
attributes, not only one at a time.
The attributes must be read-only.
The programming environment is VB.NET.

Fermo

Cindy M -WordMVP- said:
Hi Fermo,

Could you explain what you want to have happen with the attributes? And with
the entire document? Should the user just be reading, be editing...?

Also, which programming environment are you using?
Sorry, the application is WORD :)))..
I have tryed with comments.
For each xml node i have created a comment containing the attributes of the
node.
The problem is that the comment shows the word 'comment [xxx]' and is not
possible to hide it.
Someone has suggested shapes, but that is more difficult than comments.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)


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

Cindy M -WordMVP-

Hi =?Utf-8?B?RmVybW8gVmlnbmV0dGk=?=,
What i want is:
display in the document, near each tag or in the xml structure (task pane)
the attributes of each xml node. In this way the user can see all the
attributes, not only one at a time.
The attributes must be read-only.
The programming environment is VB.NET.
OK, my suggestion would be along these lines
- .NET opens the XML document
- using the XML tools provided by .NET, it processes the XML in the
document, pulling out the attributes
- write the attributes into the text, adjacent to the XML tags
- use Word 2003's new protection to lock down everything except the
ranges within the XML tags (assuming the user should be able to edit this
info). Roughly, that could go like this

For Each node In doc.Range.XMLNodes
If node.HasChildNodes = False Then
node.Range.Editors.Add wdEditorEveryone
End If
Next

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 :)
 
F

Fermo Vignetti

Thanks very much Cindy, i think i will follow your suggestion.
But it's a pity that Word doesn't behave like a real xml editor.

Fermo
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?RmVybW8gVmlnbmV0dGk=?=,
Thanks very much Cindy, i think i will follow your suggestion.
But it's a pity that Word doesn't behave like a real xml editor.
It would be nice :) However, there are lots of XML editors out
there, so I can understand MS not wanting to invest funds in
"recreating the wheel". Perhaps, if enough people scream for it,
they'll do that in a later version. Or someone will come up with
an Addin to make it easier.

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 :)
 

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