JSF 2.0 - insert additional content into h:selectOneRadio

Hello,
I am trying to convert current pages into JSF and I have difficulties with the following code:
<div id=set>
  <label>
      <input type="radio" name="inputData" value="default" />
      Default
  </label>
  (<a href="sample.xml">Download 13 kB</a>)
  <br />
  <label>
      <input type="radio" name="inputData" value="custom" checked/>
      Custom
  </label>
    <input id="file" type="file" name="file" size="32"/>
</div>If I use this JSF 2.0 'alternative'
<div id=set>
  <h:selectOneRadio id="dataSource" value="#{paramsBean.dataSource}" >
      <f:selectItem itemValue="1" itemLabel="#{i18n.dataSourceDefault}"/>
      <h:outputLink target="sample.xml" title="#{i18n.inputDataDownload} 13 kB"/>
      <br />
      <f:selectItem itemValue="0" itemLabel="#{i18n.dataSourceCustom}"/>
        <input id="file" type="file" name="file" size="32"/>
  </h:selectOneRadio>
</div>but outputLink is ignored at all while the input file control is placed before radio buttons...
Is something like this possible or should I use any workaround? I have no idea how to solve this.
Regards,
Jan

Thanks for your hint, but if I use the following code:
<h:dataTable>
    <h:column>
        <h:selectOneRadio id="dataSource" value="#{paramsBean.dataSource}" >
            <f:selectItem itemValue="1" itemLabel="#{i18n.dataSourceDefault}"/>
            <f:selectItem itemValue="0" itemLabel="#{i18n.dataSourceCustom}"/>
        </h:selectOneRadio>
    </h:column>
    <h:column>
        <h:outputLink value="sample.xml">#{i18n.inputDataDownload} 13 kB</h:outputLink>
        <input id="file" type="file" name="file" size="32"/>
    </h:column>
</h:dataTable>No output is generated:
<table>
  <tbody>
    <tr><td></td></tr>
  </tbody>
</table>I've tried panelGrid instead:
<h:selectOneRadio id="dataSource" value="#{paramsBean.dataSource}" >
    <h:panelGrid columns="2">
        <f:selectItem itemValue="1" itemLabel="#{i18n.dataSourceDefault}"/>
        <h:outputLink value="sample.xml">#{i18n.inputDataDownload} 13 kB</h:outputLink>
        <f:selectItem itemValue="0" itemLabel="#{i18n.dataSourceCustom}"/>
        <input id="file" type="file" name="file" size="32"/>
    </h:panelGrid>
</h:selectOneRadio>but although it produces something, it is not complete (notice also an extra table below):
<table>
  <tbody>
    <tr><td></td><td><a href="sample.xml">download 13 kB</a></td></tr>
    <tr><td></td><td><input id="file" type="file" name="file" size="32" /></td></tr>
  </tbody>
</table>
<table id="j_idt28:dataSource">
     <tr></tr>
</table>I've tried many combinations - it produces either incomplete outputs or improper nested tables in cells... No attempt has been successful yet.
I am quite annoyed now. Are we really in 21 century?

Similar Messages

  • How do I insert additional clips into my video timeline in Elements 13?  When clicking 'add media' it added the clips at end of video rather than in their appropriate position.  Could not 'cut and paste'.

    How do I insert additional clips into my video timeline in Elements 13?  When clicking 'add media' it added the clips at end of video rather than in their appropriate position.  Could not 'cut and paste'.

    bhsleadership
    I am in the process of preparing to test a sample from your brand and model camera in my Premiere Elements 8.0/8.0.1 on Windows 7 64 bit. I will have the results probably tomorrow morning.
    For now I just want to put you through the drill that I do for anyone who says he/she is using Premiere Elements 8.0/8.0.1.
    1. Are you working from the 8.0/8.0.1 Update of the program?
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=4653
    2. Do you have the automatic Background Rendering and AutoAnalyzer features turned OFF.
    For Background Rendering option. See Edit Menu/Preferences/General.
    For AutoAnalyzer option. Click on Organizer in the row below the blue active Organize header in order to open the Elements Organizer. In the Elements Organizer workspace, go to Edit Menu/Preferences/AutoAnalyzer Options and disable all the AutoAnalzyer options. To return to the Premiere Elements workspace from the Elements Organizer workspace, in the Elements Organizer workspace, go to File Menu/Exit.
    Is your computer optimized in spite of the fact that  you have a high end laptop? I presumed so but always go to verify, no pile ups of preview files, conformed video and audio files et al.
    Looking at the properties of your source media, I see:
    video compression = MPEG1
    audio compression = MPEG-Layer1 (.mp2)
    Frame Size = 640 x 480 (4:3)
    Pixel Aspect Ratio = 1.0
    Frame Rate = 30 progressive frames per second
    With properties like those you are sure to get a red line over that content since there is no project preset with that description.
    But, your choice of the default NTSC DV Standard would have been mine also.
    I am heading to try to get a quick look at the behavior of the sample video here in my Premiere Elements 8.0/8.0.1.
    To be continued.
    ATR

  • Inserting XML content into Database

    Hallo
    i´m new to Oracle.
    i want to insert xml content into the database. for testing i installed the version 10g on a windowsxp computer.
    i read the oracle xmldb developer´s guide. on page 3-4 ff. it is explained how i can insert content into the database. that´s how i did it (with isqlplus):
    create table example1(key_column varchar2(10) primary key, xml_column xmltype)
    -->works fine
    create table example2 of xmltype
    -->works fine
    now i made a directory under c:\myXmlFilesForDb in WinXp
    create directory xmldir as 'c:/myXmlFilesForDb in WinXp'
    (also tried: create directory xmldir as 'c:\myXmlFilesForDb in WinXp')
    --> in this directory is a file named: mydokument.xml
    --> works fine
    insert into example2 values(xmltype(bfilename('xmldir','mydokument.xml'), nls_charset_id('AL32UTF8')))
    the following error message is displayed (in German):
    ORA-22285: Verzeichnis oder Datei für FILEOPEN-Vorgang nicht vorhanden
    ORA-06512: in "SYS.DBMS_LOB",Zeile 523
    ORA-06512: in "SYS:XMLTYPE",Zeile 287
    ORA-06512: in Zeile 1
    whats wrong? can anybody help me please?
    ohhh....
    thank you very much
    cu
    George

    Directory entries are case sensitive.
    Select * From dba_directories to ensure you case is the same as you are using in your insert statement.
    Are you using the same user? if not grant read on directory directoryname to username;
    try to just select.
    select dbms_lob.getLength(BFileName('directoryname','filename.xml'))
    as length
    from dual;

  • Inserting HTML content into an animated DIV

    Can you, and if so how, insert HTLM content into an EGDE animated Div box? Specificaly an HTML table?  I can get the html code in the box but it won't read/render it as html code. In flash you can tell the program that the contents of the box is html code and it will read it as such but I don't see any way to do that here. I've tried several ways and I can get the code to display in the box but it won't render the code instruction in the boxCan it be done ??
    Thanks
    joel

    Hi,
    1) Your json file is not valid.
    You can copy and paste your datas here: http://jsonlint.com/
    Red commas must be deleted.
          "player": [
                "image": "images/player1.jpg",  //this is the URL I want to retrive
               "name": "player1",
                "image": "images/player2.jpg",
                "name": "player2", 
                "image": "images/player3.jpg",
                "name": "player3", 
                "image": "images/player4.jpg",
                "name": "player4",
    2)An example from http://docs.jquery.com/Ajax/jQuery.getJSON:
    3) compositionReady Tests.
    On compositionReady, i write:
    var profiles = {
                   "player": [
                        "image": "images/player1.jpg",
                        "name": "player1",
                         "image": "images/player2.jpg",
                         "name": "player2", 
                         "image": "images/player3.jpg",
                         "name": "player3", 
                         "image": "images/player4.jpg",
                         "name": "player4",
    console.log(profiles.player[1].image); // this line returns: "images/player2.jpg"
    Note: i deleted the first "[" and the last "]".

  • Must insert new content into body element-

    I'm using 1.4.0_01-b03 with JEditPane and the HTMLToolKit. Up until this afternoon everything was working fine. Now randomly, I am getting the following stack trace. I am loading using setPage(URL url) to set the contents. The contents of the page being load have not changed.
    Any clues?
    java.lang.RuntimeException: Must insert new content into body element-
         at javax.swing.text.html.HTMLDocument$HTMLReader.generateEndsSpecsForMidInsert(HTMLDocument.java:1878)
         at javax.swing.text.html.HTMLDocument$HTMLReader.<init>(HTMLDocument.java:1854)
         at javax.swing.text.html.HTMLDocument$HTMLReader.<init>(HTMLDocument.java:1729)
         at javax.swing.text.html.HTMLDocument$HTMLReader.<init>(HTMLDocument.java:1724)
         at javax.swing.text.html.HTMLDocument.getReader(HTMLDocument.java:125)
         at javax.swing.text.html.HTMLEditorKit.read(HTMLEditorKit.java:227)
         at javax.swing.JEditorPane.read(JEditorPane.java:504)
         at javax.swing.JEditorPane.read(JEditorPane.java:522)
         at javax.swing.JEditorPane$PageLoader.run(JEditorPane.java:551)

    I ran into the same problem. I wanted to display programmatically created content which had images loaded from the jar file. I found that the following works, but I don't know why other ways fail.
    URL url = getClass().getResource("page.html");
    InputStream pageInput = getClass().getResourceAsStream("page.html");
    // Read and modify page.html into variable "content"
    html = new JEditorPane("text/html", "");
    ((HTMLDocument) html.getDocument()).setBase(url);
    html.setText(content);

  • Problem inserting ANY content into Lightbox Widget

    I'm trying out Muse. So far, generally impressed EXCEPT for Lightbox widget.
    I'm following the Adobe Muse Training - Building your first website in order to see how the program works.
    So far, I have spent over 3 hours trying to insert video into the widget and am about to give up.
    With Widget inserted and trigger defined, I click the widget, "Widget" appears in the Selection Indicator. I click again, "Container" appears. I click again "Container" appears again and inner container shows blue selection lines.
    Now, whether I go to Object > Paste HTML or just right click and paste inside the selected container, the result is the same - the video is pasted on the page itself, NOT in the container.
    I have read, re-read, re-did, started from scratch, restarted my computer and I'm going crazy. There should be no reason why it does not work.
    It should be like selecting a div tag in Dreamweaver to select the entire tag or element and place inside.
    Any ideas? Help!
    M
    As an additional oddity, I WAS ultimately able to insert the video file into the lightbox, but only after the video appeared (maddeningly) on the page. Then I dragged the video image into the inner container. THEN it worked. But why I have no idea.
    Lightbox widget needs some SERIOUS fixing.

    Content can either be created inside the lightbox widget container or it can be added to it.
    When creating new content like a rectangle or textframe, it should begin somewhere within the boundaries of the container.
    When adding/placing content it can either be dragged into the container or pasted into it. When pasting, make sure that the correct container is selected.
    Content added using "Insert HTML" is added to the page first. You can then either drag it into the container or cut it, select container and paste it there.
    You can submit a feature request at http://forums.adobe.com/community/muse/ideas for the "Insert HTML" content to be added directly to container - when the container is selected at the time of pasting/adding HTML content.
    Thanks,
    Vikas

  • Hello , how could i insert some content into a large file?

    hello , how could i insert some content in a large file? ----just like a txt editor do.
    assume that i have a 6G file(i think it large enough), then i wann insert one ascii character at the begining of the file,does that means:
    1> i need create one 6G+1byte new file, then copy all content of the original file following by that addition character?
    2> not creat new file,just set original file length to 6G+1byte,then offset all 6G byte by one byte,after all adding my one character?(it seems not some kind of optimization ...)
    what should i do?
    Edited by: littleJohnny on Jan 16, 2008 2:03 AM

    could some means can set the read hint of 6Gbyte content after my character first read out? ----just let my addition point to the begining of 6G original content ,then the addition character take the place of the file header? ----the inster may be the same....
    i just think the already used txt editor seem so fast to process insert, replace .... 2M 10M maybe.... does they doing those operation use Java Type ---String? ------read all contet into memory,then it is easy to regular expression ,relinking read order....-----does it mean large file couldn't against with pattern?
    does all ctrl+s shortcut-----rewrite original file with memory relinked order? then large file could not easily manipulate its structure but all structured file is large than plain format...
    just teach me some "already used txt editor " trick,thanks very much.

  • How do I insert additional text into a form after it has been created? - Acrobat Pro XI

    I am trying to add additional text and fields into the middle of a form I have previously created.  I can copy and paste the information in there but it does not shift the lines below it down.  Is there any easy way to accomplish this without having to recreate the entire form?
    I appreciate any help I can get.
    ~Shannon

    If you need to make such changes to the layout of the form, you should go back to the source document, edit it, and generate a new PDF. You can then replace the pages of the old document with the new pages. Any fields that you've already added will be retained and can be move to their new positions and you can add any new ones you need.

  • How to insert Captivate content into Dreamvweaver

    Hi,
    so I've finished my first movie and I want to publish it -
    which works, but I want to insert things into XHTML file via
    Dreamweaver. Is there a way how to do it? There are two swf files,
    one html and one javascript. How to make Dreamweaver put this into
    one place inside another file? I thought these two applications
    actually work together... Thanks!
    Skippi

    Alright, I know a bit of HTML, so I've copy-pasted the code
    from the file Captivate exported in DW and everything else that was
    necessary - but still, is not there any more convenient way how to
    do this?
    Thanks!

  • CLIENT_OLE2 - Attempting to insert additional rows into a table in MS Word

    I cannot find the commands to perform the above. I have looked at the Microsoft site but it only gives the VB equivalent and I cannot work out the syntax for CLIENT_OLE2 commands. Does anyone know where I can find a list of Word.Application commands that directly correspond to the old Word.Basic commands?

    Jeff·Þ·Bohrer wrote:
    2) Why is it that after every other iteration the row values are erased?
    Classic race condition.  dump the for loop and p-node and just wire the 2D array to the table terminal.!
    I'm not seeing the race condition.  What I am seeing is the table emptying after the last element was written to it on every other run.  I saw watched this with highlight execution on.
    But I'm in full agreement with just writing to the terminal.  It is a 1D array, so you will need to use a build array and transpose 2D array in order for it to write properly.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Looping through an array to insert contents into an HTML table

    Im trying to loop through a String array and insert the contents into an html table, unfortunately my coding is only filling in the first row in the table and ignores any additional info. Im using webservices that is connecting to a table in the database.
    Info = ID + ";" + played + ";" + won + ";" + lost + ";" is the String im pulling into my client.
    <table border = "1">
    <tr>
    <td><b>ID</b></td>
    <td><b>played</b></td>
    <td><b>won</b></td>
    <td><b>lost</b></td>
    </tr>
    <%
    try {
         leglessclient.LegendServiceService service = new leglessclient.LegendServiceService();
         leglessclient.LegendService port = service.getLegendServicePort();
    String Info = port.displayLog();
    String[] log = Info.split(";");
    out.println("<tr>");
    for (int a = 0 ; a < log.length; a++) {
    for (int b = 0 ; b < 4; b++){
    out.println("<td>" + (log[a]) +"</td>");
    a++;
    out.println("<td>" + (log[a]) +"</td>");
    a++;
    out.println("<td>" + (log[a]) +"</td>");
    a++;
    out.println("<td>" + (log[a]) +"</td>");
    a++;
    b++;
    out.println("</tr>");
    out.println("</table>");
    } catch (Exception ex) {
         // TODO handle custom exceptions here
    %>
    Any help would be greatly appreciated
    thanks!

    firstly, if you have multiple rows.. you need to start each row with <tr> and end with a </tr>. You just have one in the beginning and end,which will obivously give data in one row.
    out.println("<tr>");
    for (int a = 0 ; a < log.length; a++) {
    for (int b = 0 ; b < 4; b++){
    out.println("<td>" + (log[a]) +"</td>");
    a++;
    out.println("<td>" + (log[a]) +"</td>");
    a++;
    out.println("<td>" + (log[a]) +"</td>");
    a++;
    out.println("<td>" + (log[a]) +"</td>");
    a++;
    b++;
    out.println("</tr>");

  • How to insert the contents of a link in a div container?

    Hi,
    I try some layouts with CSS templates having sidebar. My problem is that when I click on the link (defined as <a href="my_text.htm">Link one</a> for example a new window appears with the contnets of the file. How do I select as target the container of a div tag?
    I tried some javascripts but the result is always the same, the link opens in a new window.
    Thanks in advance
    Chris

    How do I select as target the container of a div tag?
    Using the advanced features of TTM - create a div at the foot of the page. Insert your content into it.
    Link your text in TTM. to the div. Set the positioning, height and width parameters where you want the div content to be displayed on the same page.
    When the page is viewed the div at the bottom of the page is hidden.
    When the TTM link is clicked or moused over the div and its contents appear at the position you set

  • How do I insert additional pages inside a footnoted document with accompanying text boxes and still keep pages below syncronized?

    Is there a way to insert additional pages into a lengthy document containing continuous footnotes at the bottom of each page and accompanying text boxes on most pages without losing the syncronization of text and text box information on the pages below?

    Footnotes do not work for text in textboxes, and you can keep on adding text after existing text so I am not sure what you are asking for.
    Peter

  • ID CS5: How to include additional text into a table of contents and how to hide text from it?

    I have the following problem:
    1. I'd like to include additional Information in my table of contents which I don't want to appear in the text I refer to.
    Example: I do have a picture with a caption saying:
    picture 1: Blablabla.
    And I want to have the source of the picture as additional information in the table of contents:
    picture 1........Blablabla (source: thisandthat)........23
    Still I don't want this additional content to disappear, as soon as I update the table of contents!
    How can I achieve that?
    2. And how can I have this the other way round?
    Let's say I want the source in the caption, but not in the table of contents.
    So the caption says:
    picture1: Blablabla (source: thisandthat)
    but the table of content says:
    picture 1........Blablabla.....................23
    I was trying to achieve this by two different praograph styles in the caption. One which would be listed, and one which wouldn't be listed, but this of course resulted in always having two paragraphs in the caption, which I'd like to avoid:
    picture1: Blablabla
    (source: thisandthat)
    Any solution to this?
    Best Regards,
    Rainer Schwachsinn

    Sorry, missed the second part of the question. I think the only way to do that is to use invisible "dummy" text of some sort, and if you're going to do it for some entries, you might as will do it for all.
    One of the easiest ways is to put the text you want inthe TOC into an anchored frame attached to the actual heading in the text (so it moves along with it). Use a unique paragraph style for this text, and include this style, not the one applied to the headings inthe text, to make the TOC. I usually use a character color of red to make it satnd oout so I don't forget it's there, and the position on the page isn't really critical. Select the anchored frame, open the Attributes panel and make it non-printing. You'll see it in editing mode, the TOC will pick it up (as will variables, if required) but it will disappear on output.

  • Insert a Picture into the Picture/Image Content Control using Open XML SDK 2.0

    I have created a word template as follows
    Here PizzaPicture is a Picture Content Control, PizzaName is a Plain Text Content Control and PizzaDescription is a Rich Text Content Control
    I am able to assign text to PizzaName and PizzaDescription Easily but not able to even locate the PizzaPicture. Here is my code
    using (WordprocessingDocument document = WordprocessingDocument.Open(@".\test.docx", true)) {
    MainDocumentPart mainPart = document.MainDocumentPart;
    DocumentFormat.OpenXml.Wordprocessing.Text text = null;
    SdtContentBlock pizzaNameBlock = null;
    SdtContentBlock pizzaDescriptionBlock = null;
    //SdtContentBlock pizzaPictureBlock = null;
    List<SdtBlock> sdtList = mainPart.Document.Descendants<SdtBlock>().ToList();
    foreach (SdtBlock sdt in sdtList)
    Console.WriteLine(sdt.SdtProperties.GetFirstChild<Tag>().Val.Value);
    SdtBlock s1 = mainPart.Document.Body.Descendants<SdtBlock>().Where(r => r.SdtProperties.GetFirstChild<Tag>().Val == "PizzaName").Single();
    SdtBlock s2 = mainPart.Document.Body.Descendants<SdtBlock>().Where(r => r.SdtProperties.GetFirstChild<Tag>().Val == "PizzaDescription").Single();
    SdtBlock s3 = mainPart.Document.Body.Descendants<SdtBlock>().FirstOrDefault(r =>
    SdtProperties p = r.Elements<SdtProperties>().FirstOrDefault();
    if (p != null)
    Console.WriteLine("P is not null");
    // Is it a picture content control?
    SdtContentPicture pict =
    p.Elements<SdtContentPicture>().FirstOrDefault();
    if (pict != null) Console.WriteLine("Pict is not null");
    // Get the alias.
    SdtAlias a = p.Elements<SdtAlias>().FirstOrDefault();
    if (pict != null && a.Val == "PizzaPicture")
    return true;
    return false;
    if (s3 == null) {
    Console.Write(" s3 is Null");
    } else {
    Console.WriteLine("s3 not null");
    if (s1 != null) {
    pizzaNameBlock = s1.Descendants<SdtContentBlock>().FirstOrDefault();
    text = pizzaNameBlock.Descendants<DocumentFormat.OpenXml.Wordprocessing.Text>().FirstOrDefault();
    // here you can set the current time
    text.Text = "Peperoni";
    Console.WriteLine(text.Text);
    string embed = null;
    if (s3 != null)
    Drawing dr = s3.Descendants<Drawing>().FirstOrDefault();
    if (dr != null)
    Blip blip = dr.Descendants<Blip>().FirstOrDefault();
    if (blip != null)
    embed = blip.Embed;
    if (embed != null)
    IdPartPair idpp = document.MainDocumentPart.Parts
    .Where(pa => pa.RelationshipId == embed).FirstOrDefault();
    if (idpp != null)
    ImagePart ip = (ImagePart)idpp.OpenXmlPart;
    using (FileStream fileStream =
    File.Open(@"c:\temp\pepperoni.jpg", FileMode.Open))
    ip.FeedData(fileStream);
    if (s2 != null) {
    pizzaDescriptionBlock = s2.Descendants<SdtContentBlock>().FirstOrDefault();
    string altChunkId = "AltChunkId12345";
    AlternativeFormatImportPart chunk = mainPart.AddAlternativeFormatImportPart(AlternativeFormatImportPartType.Xhtml, altChunkId);
    chunk.FeedData(File.Open(@".\html.txt", FileMode.Open));
    AltChunk altChunk = new AltChunk();
    altChunk.Id = altChunkId;
    ////Replace content control with altChunk information
    OpenXmlElement parent = pizzaDescriptionBlock.Parent;
    parent.InsertAfter(altChunk, pizzaDescriptionBlock);
    pizzaDescriptionBlock.Remove();
    mainPart.Document.Save();
    document.Close();
    Here the call mainPart.Document.Descendants<SdtBlock>().ToList(); returns me only 2 items PizzaName, PizzaDescription but
    no PizzaPicture.
    Secondly the line   SdtContentPicture pict =  p.Elements<SdtContentPicture>().FirstOrDefault();
    returns NULL. So it seems that there is no element of type SdtContentPicture.
    What am I doing wrong? I am pretty sure that I have put PizzaPicture as a Picture content control.
    My objective is to locate this control in the document and then insert an image into it programmatically.
    MSDNStudent Knows not much!

    Hi,
    I'm running some test on your code, and I'll come back as soon as I get some update. But before that, I would recommend you to bind customXMLPart with the content controls via Content Control Tool Kit,
    which enables us to bind customXMLPart with CC by dragging and dropping.
    After binding, you can change contents of the template via OpenXML SDK easily as the following code:
    private void button1_Click(object sender, EventArgs e)
    string fileName = @"C:\CCTest.docx";
    WordprocessingDocument wordDoc = WordprocessingDocument.Open(fileName, true);
    MainDocumentPart mainPart = wordDoc.MainDocumentPart;
    CustomXmlPart customPart = mainPart.CustomXmlParts.FirstOrDefault();
    //convert image into string
    string picName = @"C:\Users\Public\Pictures\Sample Pictures\Desert.jpg";
    System.IO.FileStream fileStream = System.IO.File.Open(picName, System.IO.FileMode.Open);
    System.IO.BinaryReader br = new System.IO.BinaryReader(fileStream);
    byte[] byteArea;
    byteArea = br.ReadBytes(System.Convert.ToInt32(fileStream.Length));
    string picString = System.Convert.ToBase64String(byteArea);
    //Load the XML template
    string DataString = Properties.Resources.XMLData;
    XmlDocument xmlDoc = new XmlDocument();
    xmlDoc.LoadXml(DataString);
    //change the value
    XmlNodeList xmlNode = xmlDoc.GetElementsByTagName("pizzaPic");
    xmlNode[0].InnerText = picString;
    xmlNode = xmlDoc.GetElementsByTagName("pizzaName");
    xmlNode[0].InnerText = "Pizza Name";
    xmlNode = xmlDoc.GetElementsByTagName("pizzaDescription");
    xmlNode[0].InnerText = "Pizza Description";
    //write the custom xml data into the customxmlpart
    System.Xml.XmlTextWriter writer = new System.Xml.XmlTextWriter(customPart.GetStream(System.IO.FileMode.Create), System.Text.Encoding.UTF8);
    writer.WriteRaw(xmlDoc.InnerXml);
    writer.Flush();
    writer.Close();
    fileStream.Close();
    br.Close();
    mainPart.Document.Save();
    wordDoc.Close();
    and the XML template of the project would something like:
    <?xml version="1.0"?>
    <Pizza xmlns="http://Test/ContentControls/Pizzas">
    <pizzaPic></pizzaPic>
    <pizzaName></pizzaName>
    <pizzaDescription></pizzaDescription>
    </Pizza>
    I hope this helps.
    Calvin Gao[MSFT]
    MSDN Community Support | Feedback to us

Maybe you are looking for