XML Comment

hi all, if i want to add a comment to a dom, do i have to do this through adding a text node to an element, i.e document.createTextNode("<!--" + commentstring + "-->");or is there a way to explicitly add a comment to an xml element in the java api?
many thanks!

gosh damn it, found it in the api, i dont know how i missed it (tired), sorry again

Similar Messages

  • XML Comments in SOAP message - jax-rpc

    I ran across an issue with comments in my soap messages with regards to the serialization.
    My solution was to strip all the comments inbound and outbound.
    Are xml comments supported by JAX-RPC? I am currently scouring the internet for more information, but the closest I have come is a reference in the IBM implementation which doesn't really help me out.
    Any thoughts are appreciated.

    I'm trying to figure this out myself. I am using JAXM to access a web service but it wants the xml version...

  • XML Comment in Indesign using Apple script.

    Hi all,
    How to find the selected XML element is commented in indesign and get XML comment value in thru apple script. Any Ideas?
    -Jacintha

    You can have as many comments as you want so they require you to state the index of the comment in your reference.
    Assuming you have an object reference for the XML element, you would replace "associated XML element of selection" with that.
    tell application "Adobe InDesign CS3"   
        set myComments to {}
        if every XML comment of associated XML element of selection is not {} then
            set end of myComments to value of every XML comment of associated XML element of selection
        end if
        return myComments
    end tell
    if you know there's only going to be one comment then,
    tell application "Adobe InDesign CS3"
        if every XML comment of associated XML element of selection is not {} then
            set  myComment to value of XML comment 1 of associated XML element of selection
        end if
        return myComment
    end tell
    ~Mike

  • xml:comment with BEA 6.1 sp1

    Hello,
    I have migrated a small project from BEA WLS6.0 to WSL6.1 with sp1. This project
    use the BEA taglib to transform XML data into HTML due an XSL stylesheet.
    My problem is that with the new version of the Xalan XSLT (WLS6.1), the XSL tag
    <xml:comment> does not generate a HTML comment anymore, however it worked fine
    in the previous version.
    Could somebody help me or give me more information ? Thanks.
    Sebastien

    Hello,
    I have migrated a small project from BEA WLS6.0 to WSL6.1 with sp1. This project
    use the BEA taglib to transform XML data into HTML due an XSL stylesheet.
    My problem is that with the new version of the Xalan XSLT (WLS6.1), the XSL tag
    <xml:comment> does not generate a HTML comment anymore, however it worked fine
    in the previous version.
    Could somebody help me or give me more information ? Thanks.
    Sebastien

  • How to preserve XML comments in indesign cs4 document

    Hi,
    I have the below table xml with me:
    <?xml version="1.0" encoding="UTF-8"?>
    <informaltable xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" aid:table="table" aid5:tablestyle="UNTABLE" aid:trows="4" aid:tcols="2" float="0">
    <!--tgroup aid:table="table" aid5:tablestyle="UNTABLE" aid:trows="24" cols="2" colsep="0" rowsep="0" align="left"--><!--colspec colnum="1" colname="c1" align="left" colwidth="25"/--><!--colspec colnum="2" colname="c2" align="left" colwidth="25"/--><!--thead--><Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="129" valign="top"><para aid:pstyle="CR_H1">Chronology:</para></Cell><Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="129" valign="top"><para aid:pstyle="CR_H1">14,000 Years Ago to 1590 c.e.</para></Cell>
    <!--/thead--><!--tbody--><Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="129" valign="top"><para aid:pstyle="CR_UNTBL"><emphasis aid:cstyle="BOLD" role="strong">14,000 years ago</emphasis></para></Cell><Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="129" valign="top"><para aid:pstyle="CR_UNTBL">Early Paleo-Indians in Florida and Pennsylvania regions, and also in Monte Verde, Chile.</para></Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="129" valign="top"><para aid:pstyle="CR_UNTBL"><emphasis aid:cstyle="BOLD" role="strong">13,900 to 12,900</emphasis></para></Cell><Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="129" valign="top"><para aid:pstyle="CR_UNTBL">Clovis hunters spread</para></Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="129" valign="top"><para aid:pstyle="CR_UNTBL"><emphasis aid:cstyle="BOLD" role="strong">years ago</emphasis></para></Cell><Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="129" valign="top"><para aid:pstyle="CR_UNTBL">across North America.</para></Cell>
    <!--/tbody--><!--/tgroup--></informaltable>
    I am able to import this xml in to indeisgn document successfully. But when I export the same table out of Indesign, the xml comment  <!--tgroup... is not exported.
    Is there any method to preserve the comment on export. Please suggest a solution for this.
    Thanks,
    Gopal

    You must include the comment() as one of the elements that you select to process.
    It is best to use xsl:value-of or xsl:copy-of with select="informaltable/comment()" to avoid processing comments from other parts of your XML file. In other words, always make the processing of comment() specific to the location where you need to extract the content of the comment.

  • Xpath to find a xml comment

    What is the xpath syntax to find all xml comments?

    Yes that did it.
    No idea why I couldn't find it before on the w3.org xpath reference. Just jumps out at me now.

  • How to extract xml comments

    Hi,
    I have loaded XML files into my table of XML Type . I have comments in XML file. This comments are important to us and I want to extract this comments . How can we extract the comments present in XML file. I was not able to find any function which can do it.
    Thanks,
    Ramesh.

    Hi Ramesh,
    First of all, instead of posting three times in different forums, why not provide relevant details such as database version and a sample XML?
    Generally, XML comments are not meant to be extracted.
    If they contain so important data then most likely that data should be stored in regular element or attribute nodes.
    Here's an example using XQuery though :
    SQL> create table tmp_xml of xmltype;
    Table created
    SQL>
    SQL> insert into tmp_xml values (
      2   xmltype('<root>
      3  <!-- this is a comment -->
      4  <item/>
      5  <!-- this is another comment -->
      6  </root>')
      7  );
    1 row inserted
    SQL>
    SQL> select x.comment_text
      2  from tmp_xml t
      3     , xmltable(
      4         '/descendant::comment()'
      5         passing t.object_value
      6         columns comment_text varchar2(200) path '.'
      7       ) x
      8  ;
    COMMENT_TEXT
    this is a comment
    this is another comment

  • XML Comments Bug

    hey fellas
    I have almost wrapped up my project except for one stupid bug that am getting. I'm using Oracle XML parser for Java.9.0
    I am trying to add some xml comments in the output .xml file but it is giving trouble.
    My code:
    ====
    Comment comment =xmldocument.createComment("mary had a lazy lamb");
    xmldocument.appendNode(comment);
    =====
    Now comments are being added in the output xml file. BUT GUESS WHAT, Instead of putting the string like a usual comment in xml like -
    <!-- mary had a lazy lamb -->
    It is putting it like -
    <?#comment mary had a lazy lamb comments?> (exact code)
    This, inadverantly throws an error when I open the file using a browser.
    How to over come this.
    Thanks

    Hi Francine
    Thanks for the response.
    I am extremely sorry for writting incorrect code in my original post but I am using
    =======
    xmldocument.appendChild(comment);
    ========
    and not appendNode(comment);
    The program works fine and shows no error at run time.
    But the output file that is generated [using transform] shows the xml comment code as -
    <?#comment comments comments?> (exact code)
    and not as desired -
    <!-- comments -->
    It would be great if you can test and suggest something.
    Earlier I started with Crimson parser, then shifted to Xerces and finally to ODK XML parser. Both Crimson and Xerces give comment as desired but ODK API is giving the above undesired comment which cannot be interpreted correctly by the web browser. [ODK is preferable 'cuz of its superior processing speed].
    Thanks once again and anticipating a positive response from you.

  • Problem with Regular Expression: XML comment parsing

    I have create pattern to parse xml comments:
    <!--(?!.*(<!--)).*-->It works fine but only problem that I have is that it parse only last occurrence :(

    sabre150 wrote:
    MrJbee wrote:
    I have create pattern to parse xml comments:
    <!--(?!.*(<!--)).*-->It works fineI'm surprised it works fine since the ".*" is greedy and will gobble as much as it can and you will end up matching from the start of the first comment to the end of the last comment.
    but only problem that I have is that it parse only last occurrence :(Make the ".*" reluctant using ".*?" or, best of all, use an XML parser.
    Edited by: sabre150 on Jan 11, 2010 4:00 PMFirst at thanks for reply.
    Second it is not so greedy like it look. Because of that:
    (?!.*(<!--))I can`t use xml parser since It is only part of my JEditor with styles. I use reg exp to highlight comments, strings, chars and so on....
    By the way I try to replace .* => .*? and it is still no results. I mean only last is selected. Maybe you have an example on how to match structure if the do not
    have specified substrings.
    Something like this:
    hello[^(guten tag)]*bye // I know that this is wrongEdited by: MrJbee on Jan 11, 2010 1:22 PM

  • [svn] 4128: Fix for - Examples imported by the @ includeExample tag are truncated after the first or second XML comment

    Revision: 4128
    Author: [email protected]
    Date: 2008-11-17 12:53:34 -0800 (Mon, 17 Nov 2008)
    Log Message:
    Fix for - Examples imported by the @includeExample tag are truncated after the first or second XML comment
    examples-path option is now public and adding period at the end of Constructor.
    QE Notes: baselines need to be updated.
    Doc Notes: None
    Bugs: SDK-18125, SDK-18077, SDK-18126
    tests: checkintests
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-18125
    http://bugs.adobe.com/jira/browse/SDK-18077
    http://bugs.adobe.com/jira/browse/SDK-18126
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja va
    flex/sdk/trunk/modules/compiler/src/java/flex2/configuration_en.properties
    flex/sdk/trunk/modules/compiler/src/java/flex2/tools/ASDocConfiguration.java

    I have the same problem except almost every song I bought from Itunes has this problem. Not only that, but somehow some of the music, about $125 worth has been deleted form my 3 back up discs. This is only happening with my purchases and not any songs I uploaded from cd. How on earth did this happen, and how did it wipe clean 3 different back ups? I have found some of the music where it belongs, but like I said some of them are gone, gone, gone. I run three different back ups and they are on 24/7. Where is all of this music? I still have it on my ipod, but it will not load back into itunes the way purchases used to. Some of the music is purchased straight to my ipod touch, but shouldn't i be able to reload them into itunes? I spent 3 hours going 1 song at a time reloading them from their original location. But I cannot locate about $125 worth of music that I purchased from itunes. I have 6 macs in my family and preach the good news to all who will listen about hows macs are flawless. Now I have egg all over my face and have thrown away a nice sum of money on missing music. Please help!

  • XML-comments not allowed in IDOC_AAE-Adapter?

    Hi,
    we have a File to IDOC scenario and are using the IDOC_AAE adapter for sending IDOCs to the SAP system.
    In our mapping we have added some comments into the XML-IDOC-structure.
    By sending the document to the SAP-system we are getting the following error:
    MP: exception caught with cause
    com.sap.aii.af.idoc.exception.IDOCAdapterException: Error before sending due to
    idoc parsing error: (7) IDOC_ERROR_PARSE_FAILURE: Invalid XML 1.0 character
    encountered within IDocXML for type <INVOIC01>:
    state=READING_FIELD_STARTTAG, charPosition=872, lineNumber=23, columnNumber=14,
    invalidChar=U+0021,
    sourceSnippet=...RCY>^~~~<KUNDEUINR>DEXXXXXXX</KUNDEUINR>^~~~<BSART>INVO</BSART>^~~~<!--
    ZIM_IDOC_RBU_HEAD_S -->^~~... ^
    The problem seems to be the <!-- - Tag in the structure.
    But the ! (U+0021) is a correct XML 1.0 character. I don't know why the IDOC-XML parser throws this exception.
    Does anybody have an idea what the problem is?
    When we remove the comments the IDOC could be sent successfully to the SAP system.
    Are only IDOC-specific characters allowed here, no comments and no other XML-specific characters and structures?
    This would be very strange.
    Thanks for your answer.
    Regards
    Thorsten

    Hi Anoop / Ilayarajan,
    Could you please post the solution for this error. When I provision a user to PeopleSoft, I am getting similar error: com.waveset.util.WavesetException: An error occurred adding user "userID' to resource 'PeopleSoft Component Interface'. com.waveset.util.XmlParseException: XML Error: 1:1: Content is not allowed in prolog.
    Thanks
    User_idm

  • How to remove Reports Default XML Comment

    We have a report (Oracle Reports 10.1.2.0.2).
    And in the report the following Comment line is generated.
    <!-- Generated by Oracle Reports version 10.1.2.0.2 -->
    Is there a way to eliminate this line?
    this is important because some governmental organisations cannot process an XML with this comment in it.

    You can use different first page property, and remove it from other pages.

  • Having trouble importing .xml comments into Captivate 7 project.

    I'm trying to import comments made in the Captivate Reviewer program.  I exported the comments to my desktop and now when I try to import them into the the project, I get this error.
    Does anyone have any advice?  Thanks.

    Hard luck there! I guess you opened the Captivate source file after you sent for review and saved it again (with or without modification).
    When you send a Captivate review project (CREV) file for review, it uses some kind of identifier that maps the incoming XML files with the source file. If you open/ edit the source file and save it after sending it for review, a new identifier is created, which results in this kind of mismatch. Hence this issue.
    AFAIK, there is no way to import the files. You have to open the XML separately and address the comments manually.
    Sreekanth

  • Possible to Convert XML element into XML comments?

    Dear All,
    I need to automate perticular elements to be convertToXMLComments in InDesign using XML rule processer.
    It's Possible in InDesign Javascript (CS3 5.0.4 - windows)? else to help me any alternative ways?
    Thanks,
    Nagaraj

    You have to Imagine using conversion of comments

  • XML comment garder l'italique

    Bonjour,
    Je débute dans l'utilisation du XML avec InDesign, mais j'ai déjà pas mal lu de tutoriels et de commentaires et testé ce que j'ai pu. J'ai compris sauf erreur que l'on pouvait appliquer un style de paragraphe à une balise et que le texte en rapport avec cette balise allait donc être dans mon style de paragraphe italique par exemple. Mais...
    Un client a créé une très grande base de données de monnaies anciennes sous FileMaker Pro. Le fichier comporte de nombreux champs, des images, des signes spéciaux. Bref, c'est assez complexe. Mais mon souci principal est de pouvoir exporter tous ses textes en conservant l'italique qu'il a utilisé notamment dans un champ «Bibliographie» dans lequel on trouve plusieurs titres de livres en italique. Mais le texte de ce champ comporte bien évidemment du texte non italique.
    Ma question est: puis-je retrouver dans InDesign l'italique pour les titres de livres? En passant par le style de paragraphe italique mis à la balise représentant le champ «Bibliographie», tout mon texte sera en italique. Ce que je ne veux pas. En bref, obtenir le même résultat qu'avec une importation d'un texte Word.
    Est-ce vraiment clair ce que je dis, je me le demande....
    Merci

    Hello,
    Tout dépend si dans ta source XML le texte en italique est balisé spécifiquement. Tu peux alors lier cette balise à l'utilisation d'un style de caractère "italique" via "faire correspondre les balises aux styles".
    Espérant que cela t'aide
    Loic
    http://www.ozalto.com

Maybe you are looking for

  • Why is my ThinkPad track point scroller not working in Firefox 4?

    Today as advised by you I have installed Firefox 4 on my ThinkPad Z60m laptop. Earlier with Firefox and all other application worked fine but now its not working on Firefox 4 yet working fine on MS IE and other applications. Please let me know soones

  • Invalid column name 'formula6'.

    This error occurs when i attempt to process the dimension.   "- Error occurs during UpdateRemainData. Invalid column name 'formula6'." When I uncheck the InApp  FORMULAH1 and FORMULAH2 properties it process without error. When I have them as InApp, i

  • When opening firefox 3.6.8 I get a java script error at line 323

    When trying to open Firefox 3.6.8, I get a java script error: [JavaScript Error: "dir is null" {file: "file:///C:/Users/My%20Computer/AppData/Roaming/Mozilla/Firefox/Profiles/lk5mbar9.default/extensions/%7B0538E3E3-7E9B-4d49-8831-A227C80A7AD3%7D/comp

  • How to delete a document from a strange part of finder?

    There's an area of finder directly to the left of the back arrow where I was unaware that you could place documents. I dragged one up there by accident, and now I'm not sure how to get rid of it. I tried simply deleting the document from the folder a

  • Problem in accessing the table

    Hi, My database in 10g (10.2.0.4), I have created one user TEST and given insert,update,delete on ABC table to TEST from XYZ user. Also, Grant select any table to test; but when i connect with test and accessing tables of xyz it is showing error 'tab