Unfortunately I never learned programming properly, but I sometimes use XML to add custom content controls to Word documents and it is extremely useful to me. In Word I use the Developer > XML mapping pane - and the on the right side - XML mapping > Custom XML part to add my XML code (usually a simple .txt file) selecting the (Add new part...) from the dropdown list.
Now say that I added the following code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><XMLnamexmlns="XMLID"><item1>This is my custom XML part. It helps me greatly. I'd like to improve my knowledge and my codes.</item1><item2></item2></XMLname>
So far so good, if I insert 'item2' as a Rich Text content control, it gives me an empty field I can freely edit.
But here come my two problems:
If I insert 'item1' as a Rich Text content control, it gives me a field filled with the text I set, and it will look like this:
Quote
<item1>This is my custom XML part. It helps me greatly. I'd like to improve my knowledge and my codes.</item1>
appears in Word as:
This is my custom XML part. It helps me greatly. I'd like to improve my knowledge and my codes.
QUESTION 1:
The above result is still useful (since I can edit the field as I see fit), but is there a way to add a line break?
So, what I'd like to see is:
Quote
<item1>???</item1>
to appear in Word as:
This is my custom XML part.
It helps me greatly.
I'd like to improve my knowledge and my codes.
Is there a simple way in XML to do this (without adding a new tag)? Something like the '\n' in HTML?
QUESTION 2:
Is there a simple way to make a list of the text? Again, like the <ul> tag in HTML, but without using additional tags. So for example
Quote
<item1>???</item1>
to appear in Word as:
1) This is my custom XML part.
2) It helps me greatly.
3) I'd like to improve
a) my knowledge and
b) my codes.
And if there is a way, how can I add different list styles and subpoints to the points?
Thank you all in advance, a simple answer to question 1 would help me a lot.
Line break and lists in XML
in XML
Posted
Dear all,
Unfortunately I never learned programming properly, but I sometimes use XML to add custom content controls to Word documents and it is extremely useful to me. In Word I use the Developer > XML mapping pane - and the on the right side - XML mapping > Custom XML part to add my XML code (usually a simple .txt file) selecting the (Add new part...) from the dropdown list.
Now say that I added the following code:
So far so good, if I insert 'item2' as a Rich Text content control, it gives me an empty field I can freely edit.
But here come my two problems:
If I insert 'item1' as a Rich Text content control, it gives me a field filled with the text I set, and it will look like this:
QUESTION 1:
The above result is still useful (since I can edit the field as I see fit), but is there a way to add a line break?
So, what I'd like to see is:
Is there a simple way in XML to do this (without adding a new tag)? Something like the '\n' in HTML?
QUESTION 2:
Is there a simple way to make a list of the text? Again, like the <ul> tag in HTML, but without using additional tags. So for example
And if there is a way, how can I add different list styles and subpoints to the points?
Thank you all in advance, a simple answer to question 1 would help me a lot.