How to display xml attributes in Layout (indesign cs2)

Hi,
Javascript
Indesign CS2
PC Version
Any one tell me, i want to display the ids in the margin. i read xml attribute, but i didn't know how to display to the margin. Help me.

One way of doing that is to use JDOM...
u create an xml tree, and then output using XMLOutputter class...it will be displayed in text...im not sure if thats what u want...however, if u do want to represent it visually then u may need to draw a tree...u may use the Graphics2D for that...there are alot of ways to do such thing, and the 2 possibilities arent the best...depends on what u want...elaborate more pls.

Similar Messages

  • How to remove the XML attribute value in Indesign file by javascript

    Hi all,
    How to remove the XML attribute value in Indesign file.

    Try this,
    if(elm.xmlElements[i].xmlAttributes[j].name == "aid:pstyle" || elm.xmlElements[i].xmlAttributes[j].name == "aid:cstyle")
    Vandy

  • How to display xml to html using xsl?

    hi all...may i know how to display xml to html page?
    i ve included <xsl:output method="html" indent="yes" /> inside my xsl file. i clicked on output.xml file and everything is displayed correctly but the format is xml instead of html. is there anyway to transform it to html?
    below are my xsl and xml codes:
    // xsl file
    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" indent="yes" />
    <xsl:template match="/">
    <html>
    <body>
    <h2>Document Contents</h2>
    <table border="1">
    <tr bgcolor="#9acd32">
         <th align="center">Document Name</th>     
         <th align="center">Document ID</th>          
         <th align="center">Owner</th>               
    </tr>
    <xsl:for-each select="Document/Contents">
    <tr>
    <td><xsl:value-of select="DocumentName"/></td>
    <td><xsl:value-of select="DocumentID"/></td>
    <td><xsl:value-of select="Originator"/></td>
    </tr>
    </xsl:for-each>
    </table>
    </body>
    </html>
    // xml file
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="xsltStyleSheet.xsl"?>
    <Document>
         <Contents>
              <DocumentName>register</DocumentName>
              <DocumentID>1</DocumentID>
              <Originator>hhh</Originator>
         </Contents>
    </Document>
    </xsl:template></xsl:stylesheet>

    your XSL transforms to HTML (in fact XHTML): what more do you expect? did you expected anything different from the following output? if yes: what and why?
    <html>
         <body>
              <h2>Document Contents</h2>
              <table border="1">
                   <tr bgcolor="#9acd32">
                        <th align="center">Document Name</th>
                        <th align="center">Document ID</th>
                        <th align="center">Owner</th>
                   </tr>
                   <tr>
                        <td>register</td>
                        <td>1</td>
                        <td>hhh</td>
                   </tr>
              </table>
         </body>
    </html>

  • How to Display XML in a UIWebView?

    Hi everybody. I like how Safari displays XML files and I would like to emulate that functionality in an iPhone UIWebView. However, I just can't get it to look the same when passing a URL to the UIWebView.
    For example, take a simple XML file like http://molottery.com/rss-num.xml. Viewing that in Safari looks okay, but passing that same URL into a UIWebView just shows a blank page.
    I changed the web protocol from http to feed (feed://molottery.com/rss-num.xml) and it launches the page in Safari instead of my UIWebView. Looks good, but it quit my app... :- (
    I noticed that XML files on the iPhone get re-routed through reader.mac.com so I tried appending that to my URL (http://reader.mac.com/mobile/v1/http://molottery.com/rss-num.xml) but that did not work either.
    When I tried URLEncoding the string like Safari does (http://reader.mac.com/mobile/v1/http%3A%2F%2Fmolottery.com%2Frss-num.xml) I get a UIWebView saying that "This Application Is Viewable Only On iPhone".
    So how can I emulate the regular Safari XML functionality inside my UIWebView? I will post my code upon request, if that will help. Any assistance from the Developer Community would be greatly appreciated.
    Thanks!

    You may have better luck in the iPhone dev forums...
    https://devforums.apple.com/community/iphone/web

  • How do I enable plug-ins for InDesign CS2 - files won't open

    How do I enable plug-ins for InDesign CS2 - files won't open.
    I own CS2.
    I shouldn't have to buy CS6 InDesign.
    How do I open CS 2 files and get the plug ins again.

    Asking the same question over and over will not change the answer.

  • How to display XML document

    Hello All.
    I am using Apex 3.0.1.x. I've uploaded an XML file into an XMLTYPE column in a table and am now trying to display this XML data in an Apex report region.
    I saw a beautiful example of doing this in Denes Kubicek's wonderful demo app 31517, page 90. Here's the link to this page:
    http://htmldb.oracle.com/pls/otn/f?p=31517:90
    I copied the procedure code he uses to display the XML into a package. Here's the code I'm using:
    <pre>
    PROCEDURE DISPLAY_XML (P_ID IN INTEGER)
    AS
    V_PROC VARCHAR2(100);
    V_ERRMSG VARCHAR2(300);
    V_MIME VARCHAR2 (48);
    V_LENGTH NUMBER;
    V_FILE_NAME VARCHAR2 (2000);
    V_LOB_LOC BLOB;
    XML_TO_BLOB_ERROR EXCEPTION;
    BEGIN
    V_PROC := 'ONLINE_MODEL_PKG.DISPLAY_XML_DEVICES';
    V_ERRMSG := NULL;
    SELECT DECODE(V('APP_USER'),NULL,'N','Y')
    INTO V_HTML_FLAG
    FROM DUAL;
    BEGIN
    SELECT X.MIME_TYPE,
    PROC_FUNC_PACK.CLOB2BLOB(X.DEVICE_XML.GETCLOBVAL()),
    X.DEVICE_FILENAME
    INTO V_MIME,
    V_LOB_LOC,
    V_FILE_NAME
    FROM XML_DOCS X
    WHERE X.ID = P_ID;
    EXCEPTION
    WHEN OTHERS THEN
    V_ERRMSG := SUBSTR('ERROR ('||V_PROC||'): DURING DISPLAY OF XML DATA: '||SQLERRM, 1, 300);
    RAISE XML_TO_BLOB_ERROR;
    END;
    V_LENGTH := DBMS_LOB.GETLENGTH (V_LOB_LOC);
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    OWA_UTIL.MIME_HEADER (NVL (V_MIME, 'application/octet'), FALSE);
    -- SET THE SIZE SO THE BROWSER KNOWS HOW MUCH TO DOWNLOAD
    HTP.P ('Content-length: ' || V_LENGTH);
    -- THE FILENAME WILL BE USED BY THE BROWSER IF THE USERS DOES A SAVE AS
    HTP.P ( 'Content-Disposition: filename="'
    || V_FILE_NAME
    || '"'
    -- CLOSE THE HEADERS
    OWA_UTIL.HTTP_HEADER_CLOSE;
    -- DOWNLOAD THE BLOB
    WPG_DOCLOAD.DOWNLOAD_FILE (V_LOB_LOC);
    EXCEPTION
    WHEN XML_TO_BLOB_ERROR THEN
    V_ERRMSG := PROC_FUNC_PACK.FORMAT_MSG(V_ERRMSG, V_HTML_FLAG);
    RAISE_APPLICATION_ERROR(-20010, V_ERRMSG);
    WHEN OTHERS THEN
    V_ERRMSG := SUBSTR('ERROR ('||V_PROC||'): '||SQLERRM, 1, 300);
    V_ERRMSG := PROC_FUNC_PACK.FORMAT_MSG(V_ERRMSG, V_HTML_FLAG);
    RAISE_APPLICATION_ERROR(-20020, V_ERRMSG);
    END DISPLAY_XML_DEVICES;
    </pre>
    I then invoke this packaged procedure in an iframe, just like what Denes is doing. I put the following code in my report region source field:
    <pre>
    DECLARE
    v VARCHAR2 (500);
    BEGIN
    v :=
    'SELECT '
    || '''<iframe src="#OWNER#.ONLINE_MODEL_PKG.DISPLAY_XML?p_id='
    || :p53_id
    || '"'
    || ' height="800" width="950"></iframe>'''
    || ' document_display'
    || ' FROM DUAL';
    RETURN v;
    END;
    </pre>
    When I run the report in Intenet Explorer (version 6.x), I get a strange security warning popup asking if I want to display unsecure items. When I click "Yes", the report region shows up with a "Could not find web page" error 404 inside the report region.
    I then tried running the app in Fire Fox (version 2.0.0.15). This time I do not get any security warning, but the report region shows up with the message "Procedure Doesn't Exist".
    Another page in my app calling other procedures in my package, and so, I know that Apex is "seeing" the package.
    Does anyone know why I'm seeing these strange things? And, is there, perhaps, another way to display an XML document in an Apex page?
    Thank you.
    Elie

    Hi Arthur,
    I assume you are using EP6.0, below SP3.
    The XML Forms can be displayed using standard SAP layouts only. There is a special type of servlet. This alongwith the CSS is applied when you click to display the "Show" form.
    As far as I know, there is no other way to display as you want to. You can probably get more help by specifying the exact scenario.
    Hope this helps you.
    Regards,
    Sagar

  • How to display xml code in page?

    Hi,
       I have a string which content is a xml file, I want to display the content of string in xml mode, such like dispalying a xml file in IE browser. How to do it?
        Thanks a lot!

    set the MIME type of the page to "text/xml".
    while creating the page if you create it with extention .xml, the system would automatically set this for the page.
    and just place the string holding the XML in the layout .
    <%=stringholdingxml%>
    Regards
    Raja

  • How to display XML file that XI sent to my j2ee appl?

    Hi,
    In my scenario File->XI->J2EE appl.
    I got XML page cannot be displayed.
    XML document must have a top level element. Error processing resource 'http://localhost:7001/Invoke/DisplayRes'.
    I deployed my .ear file on BEA Weblogic application server9.0
    I found no error when i tested in SXI_MONI and RWB->Message monitor as well.
    This is my servlet code:
    public class DisplayRes extends HttpServlet {
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
         doPost(request,response);
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
         BufferedReader brin =new BufferedReader(new InputStreamReader(request.getInputStream()));
         String inputLine;
         StringBuffer sBuf = new StringBuffer();
         PrintWriter out = response.getWriter();
         response.setContentType("text/xml");
         while ((inputLine = brin.readLine()) != null)
             sBuf.append(inputLine);       
             //out.setContentType("text/xml");
             //out.println(sBuf.toString());
             out.write(sBuf.toString());
              brin.close();
             out.flush();
    What went wrong.All helpful answers are highly rewarded.
    Thanks

    Hi
    Can anyone tell me how XI sends messages to applications like J2EE. In REceiver comm channel, I think we specify about the target system like J2EE appl.
    Aadapter Type: HTTP
                   Receiver
    Transport Protocol:  HTTP1.0
    Message Protocol:    XI payload in HTTP body
    Adapter Engine:      Integration Server
    Addressing Type:     URL address
    Target host:         localhost
    Service Number:      7001(Port number of Weblogic appl server--where my J2EE appl is deployed).
    Path     :  /Invoke/DisplayRes/
    Authentication Type:Use Logon Data for SAP System
    Content Type: text/xml
    Username:   xiappluser
    password:   xx
    XML code:   UTF-8
    I suppose XI sends msgs to http://localhost:7001/Invoke/DisplayRes/........
    in this example if am correct?
    Then I have given all tyhe necessary setting but my servlet is not able to display XML msg in browser?
    This is my servlet code:
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
         PrintWriter out = response.getWriter();
         BufferedReader brin =new BufferedReader(new InputStreamReader(request.getInputStream()));
         String inputLine;
         StringBuffer sBuf = new StringBuffer();
            response.setContentType("text/xml");
         while ((inputLine = brin.readLine()) != null)
             sBuf.append(inputLine);
             out.println("hi");            
                out.println(sBuf.toString());
             brin.close();
             out.flush();
    What went wrong?
    Help me, all helpful answers are highly rewarded.
    Thanks

  • How to add XML attribute to an Element using BPEL assign

    I have a request xml to a bpel process that does not contain a attribute.
    After some process I need to create this missing attribute and set a value.
    I tried using the XML fragment in the Assign Activity. But how can I create a attribute?
    This XML node to which I am trying to create an attribute is a very huge node with lot of dynamic typing(xsi:type). I can just re-create the complete xml with required nodes.
    Does any one know how I can create a xml attribute using the BPEL assign? I do not want to use the Java code in my process.
    Thanks.

    I'm bit confused about what exact problem you are facing with attributes.
    You can check accessing XML attributes in BPEL Assign @ http://download.oracle.com/docs/cd/E12483_01/integrate.1013/b28981/manipdoc.htm#BABIHDHI from the page http://download.oracle.com/docs/cd/E12483_01/integrate.1013/b28981/manipdoc.htm.
    I suppose your source input has no attributes and destination has to be an xml with attribute of type xsi:type. You can use the assign activity as mentioned in above document to assign your type structure to type attribute.

  • How to display Xml in a JEditorPane(in an applet)

    Hi All,
    I have an applet and i want to display xml in a JEditorPane in an applet. This xml document has a xsl attached to it for transformation. How can i do the transformation??
    Help or sample code or link to a sample code is highly appreciated!!!!
    Thanks
    Ragu

    Look this servlet which does a transformation. JEditorPane could call this servlet (with the method setPage) to do the transformation:
    public class SampleXSLTServlet extends javax.servlet.http.HttpServlet {
    public final static String FS = System.getProperty("file.separator");
    // Respond to HTTP GET requests from browsers.
    public void doGet (javax.servlet.http.HttpServletRequest request,
    javax.servlet.http.HttpServletResponse response)
    throws javax.servlet.ServletException, java.io.IOException
    // Set content type for HTML.
    response.setContentType("text/html; charset=UTF-8");
    // Output goes to the response PrintWriter.
    java.io.PrintWriter out = response.getWriter());
    try
    javax.xml.transform.TransformerFactory tFactory =
    javax.xml.transform.TransformerFactory.newInstance();
    //get the real path for xml and xsl files.
    String ctx = getServletContext().getRealPath("") + FS;
    // Get the XML input document and the stylesheet, both in the servlet
    // engine document directory.
    javax.xml.transform.Source xmlSource =
    new javax.xml.transform.stream.StreamSource
    (new java.net.URL("file", "", ctx+"foo.xml").openStream());
    javax.xml.transform.Source xslSource =
    new javax.xml.transform.stream.StreamSource
    (new java.net.URL("file", "", ctx+"foo.xsl").openStream());
    // Generate the transformer.
    javax.xml.transform.Transformer transformer =
    tFactory.newTransformer(xslSource);
    // Perform the transformation, sending the output to the response.
    transformer.transform(xmlSource,
    new javax.xml.transform.stream.StreamResult(out));
    // If an Exception occurs, return the error to the client.
    catch (Exception e)
    out.write(e.getMessage());
    e.printStackTrace(out);
    // Close the PrintWriter.
    out.close();

  • How to display XML content in a JSP

    Hi,
    can anyone help me in displaying xml content in a JSP?

    I think you want to display value from XML page to the
    JSP.If thats the case you can try out this
    xml...
    <component-profile>
            <property name="parm" value="Hi"/>
    </component-profile>
    jsp...
    <% var=profile.getProperty("parm");%>
    Hope this helps
    gEorgE

  • How to display XML file in java swing

    hi all
    now i do my M.Sc., project on data maining.this time i have one problem,thats i can't display XML file in swing frame.so any one know this plz give me that idea or code.
    Thanks to all.
    RSK

    One way of doing that is to use JDOM...
    u create an xml tree, and then output using XMLOutputter class...it will be displayed in text...im not sure if thats what u want...however, if u do want to represent it visually then u may need to draw a tree...u may use the Graphics2D for that...there are alot of ways to do such thing, and the 2 possibilities arent the best...depends on what u want...elaborate more pls.

  • How to call javascript using applescript in InDesign cs2 Mac

    Hi,
    I need to integrate javascript with my apple script??? how to use it???please help me...i need it immediately..........

    Hi Andrew,
    Here is an example for you – a snippet from my script:
    global myBridgeLabel
    -- function that runs on clicking the button in adobe script studio project
    on clicked theObject
    if name of theObject is "b1" then
    set processName to "Started working"
    set myBridgeLabel to "Red"
    set myLabel to 1
    else if name of theObject is "b2" then
    set processName to "Started doing this"
    set myBridgeLabel to "Green"
    set myLabel to 2
    else if name of theObject is "b3" then
    set processName to "Started doing that"
    set myBridgeLabel to "Yellow"
    set myLabel to 3
    else if name of theObject is "b4" then
    set processName to "Finished doing this"
    set myBridgeLabel to "Blue"
    set myLabel to 4
    else if name of theObject is "b5" then
    set processName to "Finished doing that"
    set myBridgeLabel to "Purple"
    set myLabel to 5
    end if
    tell application "Adobe InDesign CS2"
    set mydocument to active document
    set myDocumentPath to full name of mydocument
    set workerName to "Kasyan"
    tell metadata preferences of mydocument
    set theDate to current date
    set myWeekday to weekday of theDate as string
    set myDenNedeli to my convertWeekday(myWeekday)
    set myRecord to (processName & " – " & workerName & " – ") & myDenNedeli & " " & text 1 thru -4 of time string of theDate & " \r"
    set myHistory to get property namespace "http://ns.adobe.com/photoshop/1.0/" path "History"
    set property namespace "http://ns.adobe.com/photoshop/1.0/" path "History" value myHistory & myRecord
    end tell
    set myJavaScript to "var myLabel =\"" & myBridgeLabel & "\"; app.activate(); var bt = new BridgeTalk; bt.target = \"bridge\"; myScript = 'app.displayDialogs = \"none\"; var t = new Thumbnail (File (\"" & myDocumentPath & "\")); var mdata = t.metadata; mdata.namespace = \"http://ns.adobe.com/xap/1.0/\"; mdata.Label = \"' + myLabel + '\";'; bt.body = myScript; bt.send();"
    do script myJavaScript language javascript
    In this javascript I use pares of single and double quotes.
    The main java script – myJavaScript – (inside double quotes) contains another java script – myScript – (inside single quotes) which runs in Bridge via BridgeTalk.
    I also put variables from AppleScript into JavaScript by using two pares of double quotes – the outside pare I escape with slashes:
    set myBridgeLabel to "Red" -- a variable I defined in AppleScript
    set myJavaScript to "var myLabel =\"" & myBridgeLabel & "\"; app.activate();
    -- the contents of myBridgeLabel variable now becomes part of the JavaScript
    Kasyan

  • How much does it cost to update InDesign (CS2) to the current version?

    I need to update my InDesign (CS2) to the current version. I have a file created by a version of InDesign that I can not open without installing many plug ins or updating the whole program. How much does this cost per licence?

    I am sorry the upgrade is available for  CS 3 and above version.
    Now CS 2 is an free application.
    You may purchase InDesign CC 2014 single app subscription , it will cost you $19.99
    Please refer below link :
    https://creative.adobe.com/plans

  • How to Get xml Attribute value from a given  xpath

    i'm building an xml from 3 columns a,b,c using 'SELECT EXTRACT (XMLELEMENT ("ROOT",.........)'
    and my xml looks something like this
    <ROOT>
    <categories>
    <catogory value="col a value" display="true"/>
    <catogory value="col b value" display="false"/>
    <catogory value="col c value" display="false"/>
    </categories>
    <DATAS>
    </DATA>
    </ROOT>
    now under the datas node i want to use xpath like this
    (case when '/root/categories/catogory/[@display="true"]' then '/root/categories/catogory/@value' else 0 end)
    so tat i get values under data node based on display attributes.... is it possible..
    if not is ther any alternative way of using xpath

    What version of Oracle (4 digits)?
    Are you trying to populate the Data node when you are building the XML originally via your SQL/XML statement or are you talking about modifying some existing XML to add more nodes to it based on data in the XML already?

Maybe you are looking for

  • Zen Nano Plus- help can't turn it

    I bought a Zen Nano Plus back in May, it worked fine until now. Now it will turn on half way then shut right off. My computer will recognize it, but the software won't. i can use all the help.

  • Errors closing Word multiple documents

    Since upgrading to GroupWise 7 Support Pack 3 this problem occurs for everyone: Multiple Word documents have been opened. Closing any of the open Word documents will cause the message to appear 'This file is in use by another application or user'. Th

  • Can i use QT MouseEvents Class to move the Camera

    Hi We are streaming video using RTP to QuickTime and now we need to move the camera from the user's browser. Can we use the QTMouseEvent Class to move the Camera over the network..??? Thanks,

  • ITunes 12.1.2.27 won't open

    I have downloaded this twice, but it will not open on my macbook running OS10.10.3. Anyone got any ideas?

  • AQ or OMB in oracle 9i?

    After having read a lot of the documentation available for oracle 8i and 9i it seems to me like OMB is mentioned a lot less in the docs for 9i. Also, as AQ has been extended in 9i to include support for tibco, mqseries and message transformations it