Apply a paragraph style to XML elements that have a specific attribute

1) I'm an almost complete noob when it comes to XML
2) I have an XML with a ssstructure like this:
<chapter>
     <paragraph> bla bla </paragraph>
     <paragraph> bla bla </paragraph>
     <list type="disk">
          <listitem>
               <paragraph> bla bla </paragraph>
               <paragraph> bla bla </paragraph>
          </listitem>
          <listitem>
               <paragraph> bla bla </paragraph>
               <paragraph> bla bla </paragraph>
          </listitem>
          <listitem>
               <paragraph> bla bla </paragraph>
               <paragraph> bla bla </paragraph>
          </listitem>
     </list>
     <list type="square">
          <listitem>
               <paragraph> bla bla </paragraph>
               <paragraph> bla bla </paragraph>
          </listitem>
          <listitem>
               <paragraph> bla bla </paragraph>
               <paragraph> bla bla </paragraph>
          </listitem>
          <listitem>
               <paragraph> bla bla </paragraph>
               <paragraph> bla bla </paragraph>
          </listitem>
     </list>
</chapter>
Is there a easyer way (except iterating all the xmlElements) to find all the lists and apply the appropriate paragraph style (i have a "list_with_disk" paragraphstyle, and a "list_with_square" one)?

Hi Vamitul,
Please try the below JS code.
var myDoc = app.activeDocument;
//____________________ disk bullet style apply
try{
    var rootElement = myDoc.xmlElements.item(0);
    var linkElementList = rootElement.evaluateXPathExpression("//list[@type='disk']//paragraph");
    for(i=linkElementList.length-1; i>=0; i--){
        var myAttribute = linkElementList[i];
        myAttribute.xmlContent.appliedParagraphStyle = myDoc.paragraphStyles.itemByName("Disk");
    }catch(e){}
//____________________ Squar bullet style apply
try{
    var rootElement = myDoc.xmlElements.item(0);
    var linkElementList = rootElement.evaluateXPathExpression("//list[@type='square']//paragraph");
    for(i=linkElementList.length-1; i>=0; i--){
        var myAttribute = linkElementList[i];
        myAttribute.xmlContent.appliedParagraphStyle = myDoc.paragraphStyles.itemByName("Square");
    }catch(e){}
thx,
csm_phil

Similar Messages

  • How to apply paragraph styles to xml tag?

    Hi All,
    How to apply paragraph style to xml tag?

    Hi Learner,
    Try the below js code.
    var myDoc = app.activeDocument;
    try{
        mySel=app.selection[0];
        myDoc.xmlElements[0].xmlElements.add({markupTag:"TEST", xmlContent:mySel});
        }catch(e){
            alert(e);
    var myDocument = app.activeDocument;
    app.findGrepPreferences.appliedParagraphStyle = "test";
    app.findGrepPreferences.findWhat = ".+(?=\\r)"
    var mySearch = myDocument.findGrep(false);
    for (a=0; a<mySearch.length; a++){
        myDocument.xmlElements[0].xmlElements.add({markupTag:"TEST", xmlContent:mySearch[a]});
    thx,
    csm_phil

  • Asign paragraph styles to xml nodes

    Hello all,
    I try to asign paragraph styles to xml nodes. I tried to autoasign the styles to tags and also to assign the styles directly to the xml tags with aid:pstyle. None of it with success. I think that this happens because there is a paragraph formating missing in my xml. I tried to change this with <aid:br/> but also no success.
    This is how my xsl looks like:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
      <xsl:output method = "xml" version="1.0" encoding="UTF-8" indent="yes"/>
      <xsl:strip-space elements="*"/>
      <xsl:template match="ooo_sheet">
        <Root>
          <xsl:for-each select="ooo_row">
              <Artikel>
              <xsl:copy-of select="Artikelnummer"/>
                  <Bild>
                        <xsl:attribute name="href">
                      <xsl:text>file:///</xsl:text>
                      <xsl:value-of select="Bildpfad"/>
                        </xsl:attribute>
                  </Bild>
                  <Text xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/">
                        <EK aid5:pstyle="EK"><xsl:value-of select="EK"/><aid:br/></EK>
                    <Details aid5:pstyle="Details"><xsl:value-of select="Details"/><aid:br/></Details>
                    <Abmessungen aid5:pstyle="Abmessungen"><xsl:value-of select="Abmessungen"/><aid:br/></Abmessungen>
                    <Artikelnummer aid5:pstyle="Artikelnummer"><xsl:value-of select="Artikelnummer"/><aid:br/></Artikelnummer>
                  </Text>
              </Artikel>
          </xsl:for-each>
        </Root>
      </xsl:template>
    </xsl:stylesheet>
    I want to achieve that I can pull the the following tag from the structure view in Indesign to a textframe and the text gets the different formating.
    <Text xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/">
                        <EK aid5:pstyle="EK"><xsl:value-of select="EK"/><aid:br/></EK>
                    <Details aid5:pstyle="Details"><xsl:value-of select="Details"/><aid:br/></Details>
                    <Abmessungen aid5:pstyle="Abmessungen"><xsl:value-of select="Abmessungen"/><aid:br/></Abmessungen>
                    <Artikelnummer aid5:pstyle="Artikelnummer"><xsl:value-of select="Artikelnummer"/><aid:br/></Artikelnummer>
    </Text>
    Could anyone point me to the right direction? Any help is very welcome. Thank you for your help.

    Sorry, my last example was the xsl instead of the xml. Here is the xml I got. I want to pull the Root/Artikel/Text Tag to a frame and all Child tags within should be formated with the corresponding pstyles.
    But it looks like as if Indesign just does not tranform the aid5 style upon xml/xlst import. The <aid:br> tags you see are just a try of myself to get the tags within the Text tag separated as paragraph.
    But Indesign just interprets them as normal tags and also shows them in the structure pane.
    Thank you very much for your help. I also tried to format the text with the paragraph styles by hand and export the whole thing as xml from Indesign. But Indesign just the xml the same way I imported it. The same happens when I manually create a xml structure in Indesign, assign the styles to the text within the frame. Indesign just exports the raw xml structure. But no style declarations. So I can't see how to format the tags the right way.
    This is how my xml looks like when I import it with the upper xsl.
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Root>
        <Artikel>
            <Artikelnummer>C12-34567</Artikelnummer>
            <Bild href="file:///Users/Diamondgroup/Desktop/KatalogBeispiel/cmyk/C12-34567.PSD"></Bild>
            <Text xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/">
                <EK aid5:pstyle="EK">1234,-<aid:br></aid:br></EK>
                <Details aid5:pstyle="Details">AAA AAA AAA AAA<aid:br></aid:br></Details>
                <Abmessungen aid5:pstyle="Abmessungen"><aid:br></aid:br></Abmessungen>
                <Artikelnummer aid5:pstyle="Artikelnummer">C12-34567<aid:br></aid:br></Artikelnummer>
            </Text>
        </Artikel>
        <Artikel>
            <Artikelnummer>C23-45678</Artikelnummer>
            <Bild href="file:///Users/Diamondgroup/Desktop/KatalogBeispiel/cmyk/C23-45678.PSD"></Bild>
            <Text xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/">
                <EK aid5:pstyle="EK">2345,-<aid:br></aid:br></EK>
                <Details aid5:pstyle="Details">BBB BBB BBB BBB<aid:br></aid:br></Details>
                <Abmessungen aid5:pstyle="Abmessungen"><aid:br></aid:br></Abmessungen>
                <Artikelnummer aid5:pstyle="Artikelnummer">C23-45678<aid:br></aid:br></Artikelnummer>
            </Text>
         </Artikel>
    </Root>
    All the xsl: transformations work but the aid: and aid5: transformations just show in the xml as they where in the xsl.

  • Fonts default to 50 point when applying a paragraph style

    I have run into this several times.  When updating an InDesign file from an older version (now using CS5) when I apply a paragraph style the font defaults to 50 point no matter the style settings.  Is there some way to avoid this.  Currently I'm copying and pasting the graphics into a new file and having to reset the text.  If I copy any of the old text over it causes the same problem.
    Most of our text is copied and pasted from Microsoft Word (old version and new text edits), however, the text that was already in the document and the new text both do the same thing when a style is applied.
    CS5
    Win 7 Pro 64bit

    My original "body" style isn't base on any style and the other styles are based on "body" but none of them (including Basic Paragraph), have 50 as the size.
    I had it wrong in my original question, it's not 50 point size, it's 30 point with 50 point leading, bold, and Myriad Pro (which is my body font) that everything converts to no matter which style I choose.  My basic paragraph style is Times New Roman 12/14.  Body font that everything is based on is Myriad Pro, regular, 10/14.

  • Can you apply different paragraph styles for each orientation?

    I would like to apply different paragraph styles to the text, depending if it is viewed on portrait or landscape mode, but everytime I change one the other changes automatically. Is there a way to break this link?
    Thanks

    Unfortunately, iBA doesn't provide a lever to pull that can make a particular text style orientation specific.

  • Osb: Proxy Messaging Service retrieve only xml message that have the proper

    Hi All.
    I have a Proxy Service with Messaging Service type which read xml messages from a queue.
    The Request Message Type in the proxy is xml and I have provided the type information by declaring (in the element and type field) the XML schema type of the XML document exchanged.
    I need the proxy service to retrieve from the queue only the xml messages that have the proper schema.
    But when the proxy retrieves any xml msg in the queue regardless of their schema definition .
    Appreciate your input.
    Thx,
    Ross
    Edited by: user6677631 on Feb 25, 2013 9:52 AM
    Edited by: user6677631 on Feb 25, 2013 10:02 AM

    Selecting the XML schema for request type in a messaging proxy does not ensure the validation of incoming XML message against schema. Similarly if you create a WSDL based proxy the validation against WSDL definition will not happen automatically. Choosing XML as the type of message will only ensure that any malformed XMLs will be rejected before entering the message flow. For validating against schema you will need to explicitly add a validate action within the proxy message flow, if validation fails raise an error and roll back the message to the Queue or log the errored message and commit the message/publish to an error queue.

  • How to Use PowerShell to Delete FIM Users That Have a Null attribute name

    FIM Community Information Center Article
    Wiki Page:
    How to Use PowerShell to Delete FIM Users That Have a Null <attribute name>
    Go to the FIM Community Information Center
    Mike Crowley | MVP
    My Blog --
    Planet Technologies

    Have you run side-by-side metrics on this?
    I've run the Delete Object method and your script against similar data sets and yours appears to take a fair bit longer. I'd have to re-run in identical circumstances, a few times, to really say for sure, but my initial impression is that it will take hours
    longer.
    I guess the point is somewhat moot anyway, as for me the bit that generally takes longest is the actual query, rather than the deletions.
    Boy how I wish I could just enter something into the FIM Portal directly that would blast out a bunch of users matching a query. One day...
    FIMSpecialist.com | MCTS: FIM 2010 | Now Offering
    ECMA1->ECMA2 Upgrade Services

  • Assign paragraph-styles to xml-tags correctly. How to?

    Hi,
    I want to assign xml-tags to existing paragraph styles in InDesign CS6 on a Mac 10.6.8. The xml itself is organized like this:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <katalog>
    <artikel id="32434">
    <img href="/bilder/32434.tiff" />
    <artikeltextgruppe>
    <artikelmarke>DieselGabana</artikelmarke>
    <artikelheadline>Jeans ist super</artikelheadline>
    <artikeltext>Superjeans knallt rein.</artikeltext><artikelnummer>70238</artikelnummer>
    <artikelmaterial>100% Jeans</artikelmaterial>
    <artikelgroesse>Uni</artikelgroesse>
    <artikelfarbe>Uni</artikelfarbe>
    </artikeltextgruppe>
    </artikel>
    </katalog>
    By selecting the option "Assign formats per name to the tags" (translated from German) I wanted to generate the desired look. But if I start this all I get is the whole textblock of <artikeltextgruppe> assigned to 1 formatstyle. And besides that the whole content of <artikeltextgruppe> looks like one single paragraph without any structure (no linebreaks) The content though is correctly structured because I can highlight the value of e.g. <artikelmarke>separately by doubleclicking this tag in the structure-view.
    a) What can I do to assign the formats correctly AND to have correct linebreaks?
    b) If I drag my node <img href="/bilder/32434.tiff" /> iin the layout I get a message displayed to search again for the correct reference location. And that happens independently on using relative or absolute references (Although I need to use relative ones) What can I do here?
    thanks so much

    First, I would probably do a search and replace to remove the group element using a text editor (the <artikeltextgruppe> and </artikeltextgruppe> elements). They really are not needed.
    Second, I usually create my styles with the same names as the elements themselves. Then, after the XML is imported, I use the "map tags to styles" command from the Structure pane.
    I copied and pasted the single artikel element to create 4 records, added a varition of an image to each element record. Once the paragraph styles were mapped, your XML looked like this in a two column format (to get all 4 records on a page)...
    By default, ID will create a single line to a single line in the XML. So if you desire elements to be on their own line, the XML needs to be formatted that way. If you need different styling within a paragraph, you need to create character styles and alter the elements within an XML group and or paragraph and add the code in the XML accordingly or post process once inside of ID.
    I always need to take the XML I am given and reformat, move elements with the tree, change links to images, remove tabs and or spaces where I do not want them, tag for character styles, etc., to get close to how I want the initial format to be.
    Mike

  • How to apply multiple paragraph styles to one sentence?

    I'm using paragraph styles but is not helpful because I'm trying to apply 2 different styles within the same sentence which is not working.
    To make it work I select the sentence, apply the style, for instance "xfont-regular" then I select the word within the sentence that I want it to have a different style and I choose from the font list maybe italic so that it looks "something like this"
    Obviously by doing this, I'm loosing all the benefits of using p styles and of course it's so time consuming. Is there any way to break the sentence, keeping it in the same line, so that I can apply different styles to it? and still keep the benefits of just going to the styles and make the changes to the whole document that have that style applied.
    Thank you

    pchinique wrote:
    I'm using paragraph styles but is not helpful because I'm trying to apply 2 different styles within the same sentence which is not working.
    To make it work I select the sentence, apply the style, for instance "xfont-regular" then I select the word within the sentence that I want it to have a different style and I choose from the font list maybe italic so that it looks "something like this"
    Obviously by doing this, I'm loosing all the benefits of using p styles and of course it's so time consuming. Is there any way to break the sentence, keeping it in the same line, so that I can apply different styles to it? and still keep the benefits of just going to the styles and make the changes to the whole document that have that style applied.
    Thank you
    As Diane King mentioned, nested character styles may work for your need. Her example was an initial dropped capital (multi-line first one or several letters of a paragraph.) Dropped caps are a specific type of nested style - always the first one or more characters in a paragraph, two or more lines high.
    To use the general kind of nested style, you need to be able to identify the word or words within the paragraph that gets the nested character style. For example, the third word, or the first two words after the first semi-colon. If there is no pattern of word(s) that can be identified by position or sequence, it's possible that a GREP style can be used to find a common pattern of characters and apply a character style to it, for example a telephone number, date, or currency amount that's identified by a dollar sign, pound, or yuan.
    Search InDesign Help and Google for "InDesign nested style," "InDesign grep style," and similar terms (without quotes) for details. There have been many discussions of GREP on this forum.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Problem:  Photoshop CS6 applies two paragraph styles when one is selected

    Hi everyone,
    When I change the heading title within my text box, I select the heading and then select the appropriate style.  Instead of just changing the heading, the body text changes as well.  Is there a setting that's causing this to happen? 
    Thanks so much for your help!

    First Bug: Simply having a layer selected (even a text layer) and then clicking the "Create New Paragraph Style" will create a generic style (with default settings). You have to tell Photoshop what settings it is that you want to create a style with. Simply double-click the text layer icon (not the layer name or the blank area around it) and this will open the text layer for editing and select the text. Now when you click the "Create New Paragraph Style" button, the settings of the selected text will be made into a style. This is how they are performing the step in the video as well, but from your description it sounds like you are skipping a step. And remember, there are two different ways of creating text: single click the Text tool to create line (character) text, click and drag a text box to create paragraph text. That is why we have both Character Styles and Paragraph Styles.
    Second Bug: The Paragraph Style is applying with your text transformations calculated. So, if you create a text style that uses a 24 pt font, then you create text and transform it so that it 200% larger, when you apply the style you will end up with a font that is at 48 pts. A 50% transformation will result in a 12 pt font, etc.
    Third Bug: Not sure why that is happening to you. My Mac uses half as much RAM and doesn't run into that problem. My guess is it would have to do with the fonts you have installed on the system. Do you still see this behavior if you disable all the fonts on your system (through Font Book or your favored font managment utility)? Your suggestion that it may have something to do with Fonnnnt Shop or WebInk may be true to. Just because they aren't open currently doesn't mean they haven't modified Photoshop and the way it runs.

  • How do I apply a character style to a sentence that has an '&' in it?

    Hi all,
    I'm trying to apply the Character style 'See Figure' to any mention of of the phrase (See Figure x) which  I've figured out is: \(See Figure \d+\)
    The problem I'm facing is that sometimes I will need to list multiple figure references. It will need to read (See Figure x&y) and in rare cases (See Figure x,y&z)
    NOTE: There are no spaces in the above listed numbers.
    Thank you  for your help.

    That works perfectly, thank you very much.
    Can you break it down for me in English if you have a moment please? I think I'm reading it wrong.
    Digit followed by an Ampersand (I'm confused by the square bracket and plus...)

  • Delete specified line and next paragraph applied specified paragraph style

    Hi,
    How to find one of the specified line, then delete (e.g. <chapter>) and the next paragraph applied one of the paragraph style in the indesign javascript. Please explain

    Hi,
    Why do you want to use a [JS]? A simple grep search can do it:
    If you have to do it on other "<………>", do similar regex and use Multi-Find/Change! 
    Done with some work minutes!

  • XML element,if not including any attributes and/or child elements then

    XML element in SQLX,if not including any attributes and/or child elements then the tag should not appear, how to achive this?
    ex:Consider for <enumeration> tag where it is having some value.
    <attribute>
    <name>Ethernet Access</name>
    <enumeration>
    <StringValue>Bandwidth</StringValue>
    </enumeration>
    </attribute>
    When <enumeration> tag is not have any Value in this, then output should be as follows.
    <attribute>
    <name>Ethernet Access</name>
    </attribute>
    But what i am getting is
    <attribute>
    <name>Ethernet Access</name>
    </enumeration>
    </attribute>
    Please suggest me the solution for this.
    I tried , but when xmlelement() is not having data it will display empty tag ie </enumeration>, If xmlforest() are null it wont show tag, But i have to use xmlelement only. how can that be achived using xmlelement .

    Use a SQL case - when - else end construct to only execute the xmlelement if data is present. The SQL/XML standard is very clear, xmlElement will generate an empty element if no data is present. xmlforest will not.

  • DOM events not propigating to Iframe that are in parent element that have a js library applied

    I have a site: http://stage.globalpost.com/special-reports/burmese-journey
    The videos on slide #2 and #3, which are embedded using iframes are not able to be activated or clicked
    Tried everything to get this to work, pointer-events, z-index, ect. It works in all modern browsers and Firefox PC, but not Firefox mac.

    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How to select values of nested elements that have maxOccurs="unbounded"

    I have the following xml schema and xml data:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--W3C Schema generated by XML Spy v4.4 U (http://www.xmlspy.com)-->
    <xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:qbl="http://10.0.1.233:8080/home/cpa/xsd/qbl.xsd" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0" xdb:storeVarrayAsTable="true">
    <xs:element name="QBL_Envelope" type="QBL_Envelope_Type" xdb:defaultTable="MYQBL"/>
         <xs:complexType name="QBL_Envelope_Type">
         <xs:sequence>
                   <xs:element ref="Transmission_Date" minOccurs="0"/>
                   <xs:element ref="QBL" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
    <xs:element name="Transmission_Date" type="xs:string"/>
    <xs:element name="QBL">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="QBL_Number"/>
                        <xs:element ref="Priority"/>
                        <xs:element ref="Date_Prepared"/>
                        <xs:element ref="Line_Item" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="QBL_Number" type="xs:string"/>
    <xs:element name="Priority" type="xs:string"/>
    <xs:element name="Date_Prepared" type="xs:string"/>     
         <xs:element name="Line_Item">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="Item_Name" maxOccurs="unbounded"/>
                        <xs:element ref="Line_Item_Weight"/>
                        <xs:element ref="Line_Item_Cube_Info"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Line_Item_Cube_Info">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="Line_Item_Cube" minOccurs="0"/>
                        <xs:element ref="Line_Item_Cube_Qualifier" minOccurs="0"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Line_Item_Cube" type="xs:string"/>
    <xs:element name="Line_Item_Cube_Qualifier" type="xs:string"/>
    <xs:element name="Item_Name" type="xs:string"/>
         <xs:element name="Line_Item_Weight" type="xs:string"/>
    </xs:schema>
    insert into MYQBL values(
    xmltype('<QBL_Envelope>
         <Transmission_Date>030531</Transmission_Date>
         <QBL>
              <QBL_Number>316180J2</QBL_Number>
              <Priority>3</Priority>
              <Date_Prepared>20030530</Date_Prepared>
              <Line_Item>
                   <Item_Name>FREIGHT ALL KINDS</Item_Name>
    <Item_Name>Specail Item</Item_Name>
                   <Line_Item_Weight>0000212</Line_Item_Weight>
                   <Line_Item_Cube_Info>
                        <Line_Item_Cube>31.1</Line_Item_Cube>
                        <Line_Item_Cube_Qualifier>E</Line_Item_Cube_Qualifier>
                   </Line_Item_Cube_Info>
              </Line_Item>
    <Line_Item>
                   <Item_Name>AAAAAA</Item_Name>
    <Item_Name>BBBBBBBB</Item_Name>
                   <Line_Item_Weight>0000512</Line_Item_Weight>
                   <Line_Item_Cube_Info>
                        <Line_Item_Cube>67.1</Line_Item_Cube>
                        <Line_Item_Cube_Qualifier>E</Line_Item_Cube_Qualifier>
                   </Line_Item_Cube_Info>
              </Line_Item>
    </QBL>
    </QBL_Envelope>').createSchemaBasedXML('http://10.0.1.233:8080/home/cpa/xsd/qbl.xsd'));
    My question is how to select
    /QBL_Envelope/QBL/QBL_Number,
    /QBL_Envelope/QBL/Line_Item/Item_Name,
    /QBL_Envelope/QBL/Line_Item/Line_Item_Weight,
    /QBL_Envelope/QBL/Line_Item/Line_Item_Cube_Info/Line_Item_Cube
    /QBL_Envelope/QBL/Line_Item/Line_Item_Cube_Info/Line_Item_Cube_Qualifier
    in a select stetament? (Note that these elements QBL_Number, Line_Item and Item_Name have maxOccurs="unbounded") actually I want to use the select statement to create a view.
    I tried the following select statement and it works fine:
    select extractValue(value(b), '/QBL/QBL_Number'),
    extractValue(value(b), '/QBL/Priority'),
    extractValue(value(b), '/QBL/Date_Prepared')
    from egbl e, table(xmlsequence(extract(value(e), '/QBL_Envelope/QBL'))) b
    Please advise. It is import to us. Thank you for your help in advance!!!
    The database version is 9.2.0.3.0 and the operating system is Windows 2000.
    Thanks,
    Mary Wu

    Hi Mark,
    Thank you for your reply and I really appreciate!
    I tried the select statement you gave me but I got error:
    SQL*Plus: Release 9.2.0.3.0 - Production on Fri Aug 1 09:11:03 2003
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production
    With the Partitioning, Oracle Label Security, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.3.0 - Production
    SQL> set long 10000;
    SQL> set pagesize 10000
    SQL> select * from myqbl;
    SYS_NC_ROWINFO$
    <QBL_Envelope>
    <Transmission_Date>030531</Transmission_Date>
    <QBL>
    <QBL_Number>316180J2</QBL_Number>
    <Priority>3</Priority>
    <Date_Prepared>20030530</Date_Prepared>
    <Line_Item>
    <Item_Name>FREIGHT ALL KINDS</Item_Name>
    <Item_Name>Specail Item</Item_Name>
    <Line_Item_Weight>0000212</Line_Item_Weight>
    <Line_Item_Cube_Info>
    <Line_Item_Cube>31.1</Line_Item_Cube>
    <Line_Item_Cube_Qualifier>E</Line_Item_Cube_Qualifier>
    </Line_Item_Cube_Info>
    </Line_Item>
    <Line_Item>
    <Item_Name>AAAAAA</Item_Name>
    <Item_Name>BBBBBBBB</Item_Name>
    <Line_Item_Weight>0000512</Line_Item_Weight>
    <Line_Item_Cube_Info>
    <Line_Item_Cube>67.1</Line_Item_Cube>
    <Line_Item_Cube_Qualifier>E</Line_Item_Cube_Qualifier>
    </Line_Item_Cube_Info>
    </Line_Item>
    </QBL>
    </QBL_Envelope>
    SQL> select extractValue(value(q), '/QBL/QBL_Number'),
    2 extractValue(value(q), '/QBL/Priority'),
    3 extractValue(value(q), '/QBL/Date_Prepared'),
    4 extractValue(value(n), '/Item_Name'),
    5 extractValue(value(l), '/Line_Item/Line_Item_Weight'),
    6 extractValue(value(l), '/Line_Item/Line_Item_Cube_Info/Line_Item_Cube'),
    7 extractValue(value(l), '/Line_Item/Line_Item_Cube_Info/Line_Item_Cube_Qualifier')
    8 from MYQBL e,
    9 table (xmlsequence(extract(value(e), '/QBL_Envelope/QBL'))) q,
    10 table (xmlsequence(extract(value(q), '/QBL/Line_Item'))) l,
    11 table (xmlsequence(extract(value(l), '/Line_Item/Item_Name'))) n;
    select extractValue(value(q), '/QBL/QBL_Number'),
    ERROR at line 1:
    ORA-00904: "SYS_NT0jPUiVR5SS6VqgqEvU1LkQ=="."SYS_NC_ROWINFO$": invalid
    identifier
    SQL>
    Do you have any idea about it?
    Actually before I posted the message I had tried the same select statement and had got the same error.
    Again, thank you very much and I really appreciate your help.
    Mary Wu

Maybe you are looking for

  • Personas- what are the settings required to make them display

    I have an XP machine where personas only show as a solid color. I have a WIN 7 machine with multiple users - some users work fine and some switch off and on between working and showing only a solid color. I want to know the config settings to look at

  • Calling an inner class in a jsp:usebean tag

    Hi everybody ! Here's my problem : working in my project on multiple pages, I'm using inner classes/beans to limitate my '.java' files but I'm stuck when calling that 'inner-bean' in my jsp:usebean tag. First, I tried to declare in the class paramete

  • Error -10440 in a fresh Windows2000 installation

    I just installed and patched LabVIEW 6.0.2 and NI-DAC 6.9.3 in a Windows 2000 box. I'm trying to use some sofware that I've previously developed in a Windows NT box with exactly the same software setup. The programs were running without a hitch in th

  • Automatically generate email on failed events - SWEQADM

    Hi All! Is there any chance i can generate email notification within the transaction "SWEQADM"? This should happen on any failed / defective event --> send email to a specific adress. If there is please let me know. Thanks. Tatiana

  • How do you selectively disable users validated by nt domain?

    We are validating our sw vpn users on our 3030 via nt domain. Therefore there are no individual userids. How can we selectively disable certain users? e.g. A few office workers not allowed to come in from home. If this were Windows / RAS we could unc