Unable to define the XML tags with colon in XPath using gluecode

Hi Everyone,
I am working on XML with InDesign CS4. I need to do some automation stuffs for those. In my InDesign document, the XML tags (Eg. <ab:para>, <ab:figure> & etc…) name contains colon characters. If i try to loop these tags through gluecode using XPath expression, the script throws me a error like 'Adobe InDesign cannot processXPath expression'.
Can anyone look into this and suggest me a right solution.
Thanks in advance.
Thiyagu

Hi thiyagu,
    this.xpath = "//para";
    this.xpath = "//figure";
Try this without the XML namespace in XPath Expression.  it's not tested code,  but it may works.
Regards,
Nagaraj

Similar Messages

  • Remove XML Tags with White space.

    Hi All, I have a scenario like the below code where I have empty spaces in few columns of my tables. I create XML of the data and send it. There is a lot of code such and I can't add ISNULL() on each and every column. Is there any simple one line code working
    with the XML so that I can remove the tags with only empty spaces. TIA.
    DECLARE @xml1 VARCHAR(max)
    DECLARE @xml2 VARCHAR(max)
    set @xml1 = (SELECT 1 AS Col11, ' ' AS Col21, 'ABC' AS Col31 FOR XML RAW, ELEMENTS)
    set @xml2 = (SELECT 2 AS Col12, ' ' AS Col22, 'ABC' AS Col32 FOR XML RAW, ELEMENTS)
    DECLARE @xml xml;
    SET @xml = Cast('<ROOT>' + ISNULL(@xml1, '') + ISNULL(@xml2, '') + '</ROOT>' as xml)
    SET @xml.modify('delete //*[not(node())]');
    -- Some Way to Remove the XML Tags with Empty space here.
    select @xml as XMLString
    /* Output of the Above script.
    <ROOT>
    <row>
    <Col11>1</Col11>
    <Col21> </Col21> -- This XML Tag with a white space should be removed
    <Col31>ABC</Col31>
    </row>
    <row>
    <Col12>2</Col12>
    <Col22> </Col22> -- This XML Tag with a white space should be removed
    <Col32>ABC</Col32>
    </row>
    </ROOT>
    Welcome to MSDN Forums.
    Feel free to ask your questions and Please Note to Vote all helpful topics and
    Mark all answering posts.
    You Value Community's efforts and Community values your faith.
    - Arun Kumar Allu

    It would have helped if there had been a trim() function in XQuery.
    With some trial and error and inventive thinking I came up with this:
    <span style="color:Blue">SET</span> @xml.modify(<span style="color:#A31515">'delete //*[. <= " "]'</span>);
    As they say: it seems to work. But I leave no warranties.
    Erland Sommarskog, SQL Server MVP, [email protected]
    Wow Erland  this
    seems to work, I need to test it against my data and update on this. Thanks again.
    Welcome to MSDN Forums.
    Feel free to ask your questions and Please Note to Vote all helpful topics and
    Mark all answering posts.
    You Value Community's efforts and Community values your faith.
    - Arun Kumar Allu

  • Please help me with the XML tag reading.

    I have an content.xml with thouthand <table:table-row /> tags.
    How can I read the attributes and values of the tag 150 for example?
    Should I read one tag after the other before I reach 150, or there is a shorter way?
    XML Structure of content.xml as example below.
    In this sample I want to get the row4 and its value D4. Of course I don't know what value have the fourth tag and can't search tag with a value D4. I just know that the Row4 contains the value I need.
    Is there any possibility to read the fourth tag, or I should read from the beginning and increase the counter. If the counter is 4, I should read the value. It seems to me not a good approach, because the files can contain thousands of tags and for each value to go throught the whole xml is resource-intensive.
    <table:table table:name="Sheet1" table:style-
    name="ta1" table:print="false">
    <table:table-column table:style-name="co1" table:
    number-columns-repeated="7" table:default-cell-
    style-name="Default"/>
    <table:table-row table:style-name="ro1">
    <table:table-cell office:value-type="string">
    <text:p>A1</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>B1</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>C1</text:p>
    </table:table-cell>
    <text:p>D1</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="3"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell office:value-type="string">
    <text:p>A2</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>B2</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>C2</text:p>
    </table:table-cell>
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>E2</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="2"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell office:value-type="string">
    <text:p>A3</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>B3</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>C3</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="4"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>B4</text:p>
    </table:table-cell>
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>D4</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="3"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>B5</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="2"/>
    <table:table-cell office:value-type="string">
    <text:p>E5</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="2"/>
    </table:table-row>
    <table:table-row table:style-name="ro1" table:number-rows-repeated="2">
    <table:table-cell table:number-columns-repeated="7"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell table:number-columns-repeated="4"/>
    <table:table-cell office:value-type="string">
    <text:p>E8</text:p>
    </table:table-cell>
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>G8</text:p>
    </table:table-cell>
    </table:table-row>
    </table:table>

    Thanks for the answer.
    And is there any possibility to get the tag with the value 5. I know that the fifth tag should contain the value I want, in this case 5. But there is an attribute, and if this attribute is not null, then some tags1 can be shifted so that the third tag1 have an attribute tags=2, so I know that there is no the fourth tag and I read the next tag as fifth (with XPath doc/tag[4]).
    Should I read all tags, or there is some other way with the XPath. To search for the first tag with attributes and if its position before the fifth tag, than to decrease the tag-position counter and so on.
    <doc>
    <tag1>1</tag1>
    <tag1>2</tag1>
    <tag1 tags=2>3</tag1>
    <tag1>5</tag1>
    <tag1>6</tag1>
    </doc>Thanks in advance.

  • Unable to locate the xml-definition for FieldName with FieldId

    On a site collection of SP2013 on-premise farm, I found there are many similar log occur every minute. The logs are like:
    Unable to locate the xml-definition for FieldName with FieldId '56747800-d36e-4625-abe3-b1bc74a7d5f8', exception: Microsoft.SharePoint.SPException: Catastrophic  failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) --->  System.Runtime.InteropServices.COMException:
    Catastrophic failure  (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))      at  Microsoft.SharePoint.Library.SPRequestInternalClass.GetGlobalContentTypeXml(String  bstrUrl, Int32 type, UInt32 lcid, Object varIdBytes)     
    at  Microsoft.SharePoint.Library.SPRequest.GetGlobalContentTypeXml(String  bstrUrl, Int32 type, UInt32 lcid, Object varIdBytes)
    The log level is medium. The same set of log occur every minute with same set of 60 different GUIDs. All related function on the site is working as expected. By using PowerShell to loop thru the site collections I confirmed there is no field using these
    GUID. Also I have checked the content database and configuration database, also no luck to finding these GUIDs.
    These logs should be related with the search service since the Authentication Authorization log mentioned it is the "Crawler" account in action. However I have no idea why the crawler keep looking for these GUID. I have reset the farm service multiple
    times already.
    The farm was upgraded from SP2010 and it seems no such logs before upgrade.
    Any advice? Thank you.

    Hi Mark,
    From your description, this issue ocurred after you upgraded SharePoint 2010 to SharePoint 2013. Is it right?
    Whether you have some solutions in SharePoint 2010.
    If yes, please make sure you deploy the solution in SharePoint 2013 well after you upgraded to SharePoint 2013.
    There are some similar posts, please check if they are useful for you:
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/5fa900f0-8a1d-4ce8-9ef8-d6e599106834/unable-to-locate-the-xmldefinition-for-fieldname-with-fieldid?forum=sharepointdevelopmentprevious
    http://shipoint.com/2013/03/22/fixing-unable-to-locate-xml-definition-for-ctype-with-spcontenttypeid-in-sharepoint-2010/
    Best Regards,
    Wendy
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Unable to locate the xml-definition for FieldName with FieldId '1f8a351c-965d-4927-9c22-8772b7089f55' when trying to activate feature with references a custom field type

    I´ve a solution which contains a custom field type (found somewhere on the net, the custom field type maps a choice field to managed metadata). There is a second solution which contains site column and site content type definitions using the custom field
    type definition from field type solution.
    On my developement environment, there is no problem with this two solutions. When field type solution is deployed, i can deploy the content type solution and activate the feature and everything is fine.
    However if i give the two solutions to our adminstrator to deploy them into our staging environment, content type feature activation fails. Deploying the field type solution makes no problems. The field type is then available and i can manually creates
    columns with this new field type. However activating the content type solution fails with the error shown in the title of this message. The FieldID from the message is not part of my content type project. Searching the net doens´t show any results for that
    id. So i think it´s not some of the standard field id´s from sharepoint.
    Can anyone help?

     Stack Trace
    Unable to locate the xml-definition for FieldName with FieldId '1f8a351c-965d-4927-9c22-8772b7089f55', exception: Microsoft.SharePoint.SPException: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) ---> System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
    at Microsoft.SharePoint.Library.SPRequestInternalClass.GetGlobalContentTypeXml(String bstrUrl, Int32 type, UInt32 lcid, Object varIdBytes)
    at Microsoft.SharePoint.Library.SPRequest.GetGlobalContentTypeXml(String bstrUrl, Int32 type, UInt32 lcid, Object varIdBytes) -
    -- End of inner exception stack trace ---
    at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)
    at Microsoft.SharePoint.Library.SPRequest.GetGlobalContentTypeXml(String bstrUrl, Int32 type, UInt32 lcid, Object varIdBytes)
    at Microsoft.SharePoint.SPFieldCollection.FetchFieldsFromWeb()

  • Output to the printer printing xml tags with actual output

    Hi,
    we are calling fnd_request.submit_request with 'XDOREPPB' and assigning a printer to it.
    the output that is getting printed has both the xml tags and the actual output.
    anyone has any idea what might be the reason.
    Regards,

    Got the solution. These tags are getting generated from standard report and we can use <columnname>[1], <columnname>[2]... etc if there are multiple tags with same tag names.

  • Generating xml tags with stored procedure

    Hi Friends,
    I have to create a xml report using procedure .the code is given here to generate xml tags.
    create or replace procedure sri_xml (errbuff out varchar2,
    retcode out number) as
    /* create cursor to fetch the records*/
    cursor c_emp is select empno,
    ename,
    deptno,
    sal,
    job
    from emp;
    begin
    /* first line of xml data should be "<? xml version = "0.1"?>" */
    fnd_file.put_line(fnd_file.output,'<?xml version = "1.0" ?>');
    fnd_file.put_line(fnd_file.output,'<per_emp1>');
    for c in c_emp loop
    /* for each record create a group tag <gemp_name> at start */
    fnd_file.put_line(fnd_file.output,'<G_EMP_NAME>');
    /*EMBEDD DATA BETWEEN XML TAGS */
    fnd_file.put_line(fnd_file.output,'<empno>' || c.empno || '</empno>');
    fnd_file.put_line(fnd_file.output,'<ename>' || c.ename || '</ename>');
    fnd_file.put_line(fnd_file.output,'<sal>' || c.sal || '</sal>');
    fnd_file.put_line(fnd_file.output,'</G_EMP_NAME>');
    end loop;
    fnd_file.put_line(fnd_file.output,'</per_emp1>');
    end;
    i run the procedure in the concurrent program with output mode as text and i got the xml tags as the out put. i have created the template using the data definition and registered them in the xml publisher administer but i am unable to get the out put when i run the concurrent request it is giving the message "AUTHENTICATION FAILED".
    please help me to solve the problem and to get the desired output with desired template.
    thanks in advance,
    siddam

    Hi Siddam,
    Please post your query on BI Publisher forum.
    There are number of folks who can resolve the issue u faced.
    Please go through the bi publisher developers guide and then design the report.
    I am not sure about the process ur following for report development...i think you have to create data defination and rtf layout and then attach it to oracle xml administrator responsibility.
    Ratnesh

  • Unable to load the XML Report

    Hi,
    I am using TestStand 3.1. Someone before me has developped a lot of things in our application : specific steps, specific process model, ... . Now this person is not here anymore and I have a test report display problem.
    After an execution, the execution window cannot display the test report and displays the following message :
    "Unable to load the XML Report.
    At line 285 End tag 'NOBR' does not match the start tag 'BR'."
    Also with Internet Explorer, the test report cannot be displayed (and he locates the error at lign 287) .
    Needless to say that I am a poor guy in XML code that's why I am asking you some help.
    But, I opened the .xml with a text editor and that is the part of the code which causes the problem :
    284 </Prop>
    285 <BLOCKQUOTE>
    286 <H5><NOBR>Begin Sequence: MainSequence
    287 <BR>(X:\DATA_Utilisateur\Florian DENEVE\04_GENERIC\GenericTestMainSeq\GenericTestMainSeq.seq)<BR></BR></H5>
    288 <table BORDERCOLOR=#000000 FRAME=BOX RULES=ALL WIDTH=70%><TBODY>
    (please, be careful with the lines numbers, because i don't think that IE and TestStand have the same numbering)
    I don't know if it's a problem of basic TestStand or if it's due to the new process model and modifications realized by my previous colleague.
    Any ideas ?
    Thanks in advance for your help.

    Ok, here they are.
    There is a file called Addons.cfg.sources but I had to rename it to get it to attach
    Attachments:
    Addons.cfg.sources.txt ‏1 KB
    Addons.cfg ‏53 KB
    ResultProcessing.cfg ‏189 KB

  • Unable to Load the XML data file in to RTF template

    Hi Team,
    We are working on the XML publisher reports,where the xml data is containing the Japanese Characters.
    I am facing an error while loading my xml data which has the japanese characters values in between the XML tags into the RTF Template.Though i have installed Japan fonts in my system,still unable to load the data.
    Could any one please help me out in this regard.
    Thanks in Advance.

    Hi;
    Hi please clearfy below question for can make you fast help
    1. What is your OS?
    2. What is your EBS verison?
    3. What is your DB version and Db character set?
    Also check:
    About Oracle XML Publisher Release 5.6.3 [ID 422508.1]
    Regard
    Helios

  • How to get the XML TAG name itself instead of TAG value

    Hi All,
    I have a question here
    I want to retrieve the XML tag from a XML file instead of its value.
    Example:
    <item>Colgate</item>
    Now I want to retrieve "item" as output from XPath expression, I dont want its value as "colgate"
    How to do that...?
    Thanks
    -Praveen

    You can do this with an axes XPatch expression:
    child::node()/name()
    For more info see: http://www.w3schools.com/xpath/xpath_axes.asp
    HTH,
    Bas

  • How to Find the XML Tag in indesign

    HI!!<br /><br />We are working with XML work flow in indesign. In indesign how could we find the XML Tag in indesign.<br /><br />Example::<br />In the Below list we could have to find the xml tag <chapter> in story editor or in the main text frame in indesign using find option. Kindely sent if any Plugins is available.<br /><br />For exmaple:<br />************<br /><book><br /> <part><br /> <chapter><br />  <head><br />   <para><br />    <bold><br /><br />Thanks,<br />C.K.Venkatesan

    I imported the xml file in vb.net. now i want to find the number of pages and no. of elements. i found out it. but i was not able to find which elements are placed in which page. i want that information. plz kindly help. i am using vb.net. for eg. <ce:figure> placed in which page no., <ce:sections> placed in which page no., etc..,

  • Opatch error 'Unable to parse the xml file'

    Hi there,
    I am new to installing patches on Oarcle and I need to install patch 12375678 on my windows system, Oracle 11.2.0.2.
    I have followed the instructions in the readme.txt file, but got this error and I have not come across anywhere on the web that explain how I could fix it.
    Could you please advise?
    Thanks
    C:\>set oracle_home=C:\oracle\product\11.2.0\dbhome_1
    C:\>echo %oracle_home%
    C:\oracle\product\11.2.0\dbhome_1
    C:\>cd C:\oracle\product\11.2.0\dbhome_1\inventory\oneoffs\12375678
    C:\oracle\product\11.2.0\dbhome_1\inventory\oneoffs\12375678>opatch apply
    Invoking OPatch 11.2.0.1.1
    Oracle Interim Patch Installer version 11.2.0.1.1
    Copyright (c) 2009, Oracle Corporation. All rights reserved.
    Oracle Home : C:\oracle\product\11.2.0\dbhome_1
    Central Inventory : C:\Program Files\Oracle\Inventory
    from : n/a
    OPatch version : 11.2.0.1.1
    OUI version : 11.2.0.2.0
    OUI location : C:\oracle\product\11.2.0\dbhome_1\oui
    Log file location : C:\oracle\product\11.2.0\dbhome_1\cfgtoollogs\opatch\opatch2
    012-05-21_15-28-52PM.log
    Patch history file: C:\oracle\product\11.2.0\dbhome_1\cfgtoollogs\opatch\opatch_
    history.txt
    ApplySession applying interim patch '12375678' to OH 'C:\oracle\product\11.2.0\d
    bhome_1'
    Running prerequisite checks...
    OPatch detected non-cluster Oracle Home from the inventory and will patch the lo
    cal system only.
    Backing up files and inventory (not for auto-rollback) for the Oracle Home
    Backing up files affected by the patch '12375678' for restore. This might take a
    while...
    Backing up files affected by the patch '12375678' for rollback. This might take
    a while...
    Patching component oracle.rdbms, 11.2.0.2.0...
    Copying file to "C:\oracle\product\11.2.0\dbhome_1\rdbms\xml\xsl\kuexttbl.xsl"
    Patching component oracle.rdbms.dbscripts, 11.2.0.2.0...
    Copying file to "C:\oracle\product\11.2.0\dbhome_1\rdbms\admin\prvtbpd.plb"
    Copying file to "C:\oracle\product\11.2.0\dbhome_1\rdbms\admin\prvtbpw.plb"
    ApplySession adding interim patch '12375678' to inventory
    Interim Patch metadata parsing failure... 'Unable to parse the xml file.'
    ApplySession failed: ApplySession failed in system modification phase... 'Unable
    to create patchObject'
    OPatch will attempt to restore the system...
    Restoring the Oracle Home...
    OPatch was able to restore your system. Look at log file and timestamp of each f
    ile to make sure your system is in the state prior to applying the patch.
    OPatch failed with error code = 73

    your actions.xml must not be able to be read.
    open it in notepad yourself to see does it open, if so its not corrupt, if doesnt open download patch again.
    More then likely will be fine so try locate the patch in a shorter home path, like c:\patches\12375678 and see does it install from there.
    Only other thing I can think of is the main inventory.xml, usually c:\program files\oracle\inventory\inventory.xml
    try notepad with that too.

  • I am also unable to get the 551L working with Windows 8 Beta 1. Any advice?

    I am also unable to get the 551L working with Windows 8 Beta 1 and Mac OS X 10.8 Mountain Lion Developer Preview 2. Any Advice?

    It should be noted that I was previously in those Windows Beta's and I am also a member of both Microsoft Technet (Retail Subscription), and all 3 Apple Developer Programs (IOS, Mac and Safari), which is the reason why I am running Microsoft Windows 8 Beta 1 on 2 of my 3 Dell's (the oldest one has Microsoft Windows XP Service Pack 3 and Microsoft Office 2003 on it, which is the PC that I am using the 551L on), and the Mid Year 2010 Apple Mac Mini has Mac OS X 10.8 Mountain Lion Server Edition on it (something that I am technically am NOT supposed to be talking about here due to my NDA so this will be the last time I mention it here (as you can see I am known for being the type of  Computer Nerd that loves Alpha and Beta Testing)! :-)

  • How to get the value in the XML tag?

    hi all,
    i am new to JAXP. i tried the sample program provided in the following link. it just counts the number of tags in the XML file. XML file name is given as command line argument.
    Now, if i want to display the value in the XML tag( say <NAME>xxx</NAME> in this tag i want to display the value 'xxx' ), what has to be done?
    how can i achieve this?
    please help...
    link of the sample program:
    http://xml.apache.org/~edwingo/jaxp-ri-1.2.0-fcs/samples/SAXLocalNameCount/SAXLocalNameCount.java
    thx in advance,
    -Soni.

    implement this method the same way you have startElement...
    public void characters(char[] ch,
                           int start,
                           int length)
                    throws SAXException

  • How to add attributes in the xml tag

    hi,
    i have two tables employee,department
    employee table
    empno number,
    empname varchar2(100),
    deptno number,
    department table
    deptno number,
    deptname varchar2(100)
    i want xml file in the above mentioned two tables.The xml file is as follows,
    <?xml version="1.0" encoding="UTF-8" ?>
    <EmployeeInfo>
    <Data type="employee">
    <empno>1</empno>
    <empname>siva</empname>
    <deptno>10</deptno>
    </data>
    <Data type="department">
    <deptno>10</empno>
    <deptname>IT</empname>
    </data>
    </EmployeeInfo>
    can anybody please give plsql code for this requirement.i need to add attributes in the xml tag.Its urgent
    By
    Siva

    A general example (based on the OE sample data/tables)
    SQL>SELECT XMLElement("Emp",
      2                     XMLAttributes(employee_id AS "id"
      3                                  , '10' "dept"),
      4                     first_name||' '||last_name) as result
      5 FROM   employees e
      6 WHERE  department_id = 10;
    RESULT
    <Emp id="200" dept="10">Jennifer Whalen</Emp>

Maybe you are looking for

  • Is this a Parameter or a Security error??

    I've added this code below and the screen queries and parameters discused in the picture above but am now getting an error with the declaring statement TimesAndMARs_CanRun for the screen permission in the application.cs pictured below. namespace Ligh

  • AIR App: Get version number at runtime

    Hello, How how can I get the version number for an AIR App during runtime please? Thank you.

  • For Grant nnnnnn, specify a value for object FUND error -Urgent

    I work in SRM area and my knowledge of Grants management is almost nil. We have a PO in SRM which has account assignment associated with a Workorder and Fund. When we look at the Grant it has all green lights and is confirmed by our FI/CO team everyt

  • How should I set up my Time Capsule after a clean install of Mountain Lion?

    I just did a clean install of my computer.  I have been using time machine to backup everything to a time capsule.  I used migration assistant to reload my stuff to my computer.  I want to get time machine up and running again but I am not sure what

  • 4G 40GB iPod deleted my songs after a soft reset

    I've been resetting my iPod quite often because of skipping, freezing and everybody's favorite - the clicking hard drive. I ran the diagnostic test on it and it passed all phases of it. However, during a soft reset this morning, the iPod turned on as