Delete(xml) in Flex namespace problem

hihi
I have problem with AS3 xml
I want delete nodes in the folowing XML, which has title
"undefined". A sample from the xml:
<xml>
<page>
<title>Szabályalapú
reprezentáció</title>
<id>tudásterület_74</id>
<revision>
<id>1</id>
<timestamp>2008-05-27T09:58:13Z</timestamp>
<contributor>
<ip>Wikiadmin</ip>
</contributor>
<text aaa:space="preserve"></text>
</revision>
</page>
<page>
<title>undefined</title>
<id>tudásterület_22</id>
<revision>
<id>1</id>
<timestamp>2008-05-27T09:58:13Z</timestamp>
<contributor>
<ip>Wikiadmin</ip>
</contributor>
<text aaa:space="preserve"></text>
</revision>
</page>
<page>
<title>Döntési folyamat</title>
<id>tudásterület_22</id>
<revision>
<id>1</id>
<timestamp>2008-05-27T09:58:13Z</timestamp>
<contributor>
<ip>Wikiadmin</ip>
</contributor>
<text aaa:space="preserve"></text>
</revision>
</page>
</xml>
I tried this script but didnt worked:
delete xml.*::page.(title=="undefined")
In a basic this shuold be like:
delete xml.page.(title=="undefined")
How does it work in xmls with namespace?

"rtalton" <[email protected]> wrote in
message
news:gecgfa$3rs$[email protected]..
> Sure thing. I tried to find a one-line method but
couldn't. E4x syntax
> supports
> filtering using expressions, but not the delete command
as far as I could
> tell.
> Maybe someone else knows more. Good luck.
I think the problem is the filter expression returns an
XMLList. You can
only delete a single node. So try:
delete yourNodesFilteredByExpression[0];
HTH;
Amy

Similar Messages

  • Unstructured Xml Storage with Namespaces - Problem in DML Queries

    Hai All,
    I worked with xml namespace with registering schema in db and referred in my xml document.It worked fine.
    But i want to work in unstructured xml document with namespaces, to do all dml queries like, select,update,delete using Xpath to xmltype.
    I could insert the records,When i try to select some element from xmltype field using Xptah from db,it does not bring any thing like element value or any error.It just displaying as empty value.I am using oracle 10g R2.
    Please help me how to select the element value from xmltype using XPath or whatever it is.
    Please help me out from this to follow
    Advance Thanks,
    P.Savananan

    SQL> create user marco identified by marco account unlock;
    User created.
    SQL> grant dba, xdbadmin to marco;
    Grant succeeded.
    SQL> conn marco/[email protected]
    Connected.
    SQL> create table xml_tab ( details xmltype);
    Table created.
    SQL> insert into xml_tab values(XMLTYPE('<?xml version="1.0" ?>
      2  <customers xmlns="http://localhost/openuri.org" >
      3  <customer>
      4  <order xmlns="http://orcl.com" >
      5  <ordername>Computer</ordername>
      6  <cost>35785638</cost>
      7  </order>
      8  </customer>
      9  </customers>'));
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select extractValue(details,'/customers/customer/order/ordername') from xml_tab;
    EXTRACTVALUE(DETAILS,'/CUSTOMERS/CUSTOMER/ORDER/ORDERNAME')
    SQL> set long 10000
    SQL> select * from xml_tab;
    DETAILS
    <?xml version="1.0"?>
    <customers xmlns="http://localhost/openuri.org">
      <customer>
        <order xmlns="http://orcl.com">
          <ordername>Computer</ordername>
          <cost>35785638</cost>
        </order>
      </customer>
    </customers>
    SQL> select extract(details,'//order/ordername') XDATA
      2  from   xml_tab
      3  ;
    XDATA
    SQL> select extract(details,'//order/ordername','xmlns="http://orcl.com"') XDATA
      2  from   xml_tab
      3  ;
    XDATA
    <ordername xmlns="http://orcl.com">Computer</ordername>
    SQL> select extractValue(details,'//order/ordername','xmlns="http://orcl.com"') XDATA
      2  from   xml_tab
      3  ;
    XDATA
    Computer
    SQL> select extractValue(details,'/*/*/order/ordername','xmlns="http://orcl.com"') XDATA
      2  from   xml_tab
      3  ;
    XDATA
    Computer

  • Java transform problem - resulting XML has wrong namespace on imported Node

    I use Document.importNode(Node, String) to import a node from one document into another document. I want to preserve the namespace of the imported node. This works ok if the imported node specifies xmlns, even xmlns="". But if the imported node does not specify a namespace, I would expect the resulting serialized XML to have xmlns="". However, this is not the case. I use javax.xml.transform.Transformer when I serialize the XML. After the transform, the imported node has the namespace of the document it is imported into, which we do not want. So how do I get the imported node to serialize out with xmlns="", even if it's not specified in the source document? I am using javax.xml.transform.* and javax.xml.parsers.DocumentBuilder from Java 1.4.2.
    Example of XML that node is imported into (imported node replaces PayloadPlaceHolder):
    <?xml version="1.0" encoding="UTF-8"?>
    <Envelope envelopeVersion="0.0.0" classificationLevel="Unclassified" xmlns="http://disa.gcss.mil/XMLGateway/Envelope">
    <Header>
    <UID>GM0000001</UID>
    <DateTime>2006-12-05T16:11:50Z</DateTime>
    </Header>
    <Status reason="FAILED" lastTransactionID="9999999999" inReplyTo="ZZZ9999999999">
    <LastMessageUID>ZZZ9999999999</LastMessageUID>
    </Status>
    <Payload>
    <PayloadPlaceHolder>
    </PayloadPlaceHolder>
    </Payload>]
    </Envelope>
    Example of XML with null namespace, test_segment is imported node:
    <?xml version="1.0" encoding="UTF-8"?>
    <test_segment>
    <name>test</name>
    </test_segment>
    Example of result XML with imported node (test_segment):
    <?xml version="1.0" encoding="UTF-8"?>
    <Envelope classificationLevel="Unclassified" envelopeVersion="0.0.0" xmlns="http://disa.gcss.mil/XMLGateway/Envelope">
    <Header>
    <UID>GM0000001</UID>
    <DateTime>2006-12-05T16:11:50Z</DateTime>
    </Header>
    <Status inReplyTo="ZZZ9999999999" lastTransactionID="9999999999" reason="FAILED">
    <LastMessageUID>ZZZ9999999999</LastMessageUID>
    </Status>
    <Payload>
    <test_segment>
    <name>test</name>
    </test_segment>
    </Payload>
    </Envelope>
    Here is the code to build the documents and transform the XML:
         Document document = null;
    Document dataBlockDoc = null;
    ByteArrayInputStream inStream = new ByteArrayInputStream
    (StringUtils.getBytes(xml.toString()));
    try {
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setNamespaceAware( true );
    DocumentBuilder parser = dbf.newDocumentBuilder();
    document =
    parser.parse(
    new InputSource(inStream ) );
    if (dataBlock != null) {
    inStream = new ByteArrayInputStream(StringUtils.getBytes(dataBlock));
    dataBlockDoc = parser.parse(
    new InputSource(inStream ) );
    Element root = document.getDocumentElement();
    Element payload = null;
    NodeList children = root.getChildNodes();
    //get Payload child from envelope document
    for (int i = 0; i < children.getLength(); i++) {
    if (children.item(i).getNodeName().equals("Payload")) {
    payload = (Element)children.item(i);
    break;
    //get the PayloadPlaceHolder
    Element payloadPlaceHolderElement = null;
    children = payload.getChildNodes();
    for (int i = 0; i < children.getLength(); i++) {
    if (children.item(i).getNodeName().equals("PayloadPlaceHolder")) {
    payloadPlaceHolderElement = (Element)children.item(i);
    break;
    Node newPayload = null;
    if (dataBlockDoc != null) {
    Element dataBlockElement = dataBlockDoc.getDocumentElement();
    //make new Payload element to replace old (empty) Payload
    newPayload = document.importNode((Node) dataBlockElement, true);
    payload.replaceChild(newPayload, payloadPlaceHolderElement);
    else
    payload.removeChild(payloadPlaceHolderElement);
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer nullTransform = tf.newTransformer();
    ByteArrayOutputStream oStream = new ByteArrayOutputStream();
    nullTransform.transform(                    new DOMSource( document ),
         new StreamResult( oStream ) );
    xml = new StringBuffer(oStream.toString());
    Thanks in advance.

    It appears that the problem is that the DOM serializer implementation in JDK 1.4 is not properly handling namespaces. Does anyone know of a workaround or alternate serializers we could use to serialize a DOM tree? I also need it to work with XSLT.
    Thanks.

  • Building XPath with the XML having the Namespace using PL SQL

    While trying to build the path of each node, when the XML has no namespace in it , the below code works fine providing the result
    1~/
    2~/person/
    3~/person/age/
    4~/person/homecity/
    5~/person/name/
    6~/person/homecity/lat/
    7~/person/homecity/name/
    8~/person/homecity/long/
    But when the xml is changed to
    <person xmlns="urn:person" xmlns:lat="urn:lat">
    <name>Rob</name>
    <age>37</age>
    <homecity>
        <name>London</name>
        <lat>123.000</lat>
        <long>0.00</long>
    </homecity>
    </person>"
    The result on executing the below code is resulting into only into below result
    1~/
    2~/person/
    In the XML provided above, XML name space is not constant and it may vary for every XML. My requirement is to parse the complete XML, where i can read the XML with namespace and get the result as mentioned below
    1~/
    2~/person/
    3~/person/age/
    4~/person/homecity/
    5~/person/name/
    6~/person/homecity/lat:lat/
    7~/person/homecity/name/
    8~/person/homecity/long/
    Can you please help me resolving the issue mentioned. Thanks in advance. --Code Snippet below :
    DECLARE
      l_File VARCHAR2(32000) := '<person>
    <name>Rob</name>
    <age>37</age>
    <homecity>
        <name>London</name>
        <lat>123.000</lat>
        <long>0.00</long>
    </homecity>
    </person>';
    l_Where_Clause VARCHAR2(100) := '/*';
    l_Append_Var   VARCHAR2(100) := '/';
    TYPE Ty_Paths IS TABLE OF VARCHAR2(1000) INDEX BY PLS_INTEGER;
    l_Ty_Paths      Ty_Paths;
    l_Ty_Paths_Temp Ty_Paths;
    TYPE Ty_Verifier IS TABLE OF VARCHAR2(1000) INDEX BY VARCHAR2(1000);
    l_Ty_Varifier Ty_Verifier;
    l_Prev_Query_Rec VARCHAR2(100);
    l_Index_Num      NUMBER := 0;
    l_Cur_Exec_Row   NUMBER := 0;
    BEGIN
    l_Ty_Paths(Nvl(l_Ty_Paths.COUNT, 0) + 1) := l_Append_Var;
    l_Cur_Exec_Row := 1;
    --Dbms_Output.put_line('Before entering the loop');
    LOOP
       l_Ty_Paths_Temp.DELETE;
      SELECT DISTINCT REPLACE(l_Append_Var || '/' || t.Xml || '/', '//', '/') BULK COLLECT
       INTO   l_Ty_Paths_Temp
      FROM   (SELECT Xmltype(Extract(VALUE(e), '/').Getstringval()) .Getrootelement() AS Xml
               FROM   TABLE(Xmlsequence(Extract(Xmltype(l_File), l_Where_Clause))) e) t;
      l_Ty_Varifier(Nvl(l_Ty_Varifier.COUNT, 0) + 1) := l_Append_Var;
      --Dbms_Output.put_line('L_TY_PATHS_TEMP.Count::'||L_TY_PATHS_TEMP.Count);
      IF l_Ty_Paths_Temp.COUNT > 0 THEN
         l_Index_Num := Nvl(l_Ty_Paths.COUNT, 0) + 1;
         FOR i IN l_Ty_Paths_Temp.FIRST .. l_Ty_Paths_Temp.LAST LOOP
            l_Ty_Paths(l_Index_Num) := l_Ty_Paths_Temp(i);
            --Dbms_Output.put_line('L_INDEX_NUM::'||L_INDEX_NUM);
            --Dbms_Output.put_line('L_TY_PATHS(L_INDEX_NUM)::'||L_TY_PATHS(L_INDEX_NUM));
            l_Index_Num := l_Index_Num + 1;
         END LOOP;
      END IF;
      --Dbms_Output.put_line('L_TY_PATHS.Count::'||L_TY_PATHS.Count);
      --Dbms_Output.put_line('L_TY_PATHS.Count::'||L_CUR_EXEC_ROW);
      IF (NOT l_Ty_Paths.EXISTS(l_Cur_Exec_Row + 1)) OR (l_Cur_Exec_Row = l_Ty_Paths.COUNT) THEN
         --Dbms_Output.put_line('Exiting');
         EXIT;
      ELSE
         --Dbms_Output.put_line('Inside the Else part');
         l_Cur_Exec_Row := l_Cur_Exec_Row + 1;
         l_Append_Var   := l_Ty_Paths(l_Cur_Exec_Row);
         l_Where_Clause := l_Ty_Paths(l_Cur_Exec_Row) || '*';
      END IF;
      --To Display the record:
         --Dbms_Output.put_line(L_TY_PATHS.Count);
      END LOOP;
      IF l_Ty_Paths.COUNT > 0 THEN
        FOR i IN l_Ty_Paths.FIRST .. l_Ty_Paths.LAST LOOP
          Dbms_Output.Put_Line(i || ' record is ' || l_Ty_Paths(i));
       END LOOP;
    END IF;
    END;

    Hi,
    Thanks for the reply.
    Please find the details :
    1) What's your database version ?
    Database version  :
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    2) What's the practical use of extracting all the paths like this, what are you trying to achieve, besides a purely academic exercise ?
    The XML provided was for sample XML.
    The practical use being ,I wanted to parse the SEPA messages using the below code snippet dynamically.
    create table data_table (
         data xmltype
        xmltype column data store as securefile binary xml
    insert into data_table values (
        xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <SCTScfBlkCredTrf xmlns="urn:S2SCTScf:xsd:$SCTScfBlkCredTrf">
      <SndgInst>CMCIFRPPXXX</SndgInst>
      <RcvgInst>RLBBAT2E083</RcvgInst>
      <FileRef>006FRID2516PH712</FileRef>
      <SrvcId>SCT</SrvcId>
      <TstCode>T</TstCode>
      <FType>SCF</FType>
      <FDtTm>2012-11-01T01:12:22</FDtTm>
      <NumCTBlk>1</NumCTBlk>
      <NumPCRBlk>0</NumPCRBlk>
      <NumRFRBlk>0</NumRFRBlk>
      <NumROIBlk>0</NumROIBlk>
    <FIToFICstmrCdtTrf xmlns="urn:iso:std:iso:20022:tech:xsd:sct:pacs.008.001.02">
      <GrpHdr>
        <MsgId>006MSID12511PH712</MsgId>
        <CreDtTm>2012-11-01T08:09:14</CreDtTm>
        <NbOfTxs>1</NbOfTxs>
        <TtlIntrBkSttlmAmt Ccy="EUR">20000</TtlIntrBkSttlmAmt>
        <IntrBkSttlmDt>2012-11-01</IntrBkSttlmDt>
        <SttlmInf>
          <SttlmMtd>INGA</SttlmMtd>
          <ClrSys>
            <Prtry></Prtry>
          </ClrSys>
        </SttlmInf>
        <InstgAgt>
          <FinInstnId>
            <BIC>RLBBAT2E083</BIC>
          </FinInstnId>
        </InstgAgt>
        <InstdAgt>
          <FinInstnId>
            <BIC>HELADEF1XXX</BIC>
          </FinInstnId>
        </InstdAgt>
      </GrpHdr>
      <CdtTrfTxInf>
        <PmtId>
          <EndToEndId>006SEOP23END1712</EndToEndId>
          <TxId>006SEOP231PH1712</TxId>
        </PmtId>
        <PmtTpInf>
          <SvcLvl>
            <Cd>SEPA</Cd>
          </SvcLvl>
        </PmtTpInf>
        <IntrBkSttlmAmt Ccy="EUR">20000</IntrBkSttlmAmt>
        <AccptncDtTm>2012-11-01T12:00:00</AccptncDtTm>
        <ChrgBr>SLEV</ChrgBr>
        <Dbtr>
          <Nm>Mrinmoy Sahu</Nm>
          <PstlAdr>
            <Ctry>FR</Ctry>     
            <AdrLine>6</AdrLine>
            <AdrLine>Bangalore</AdrLine>
          </PstlAdr>
          <Id>
            <PrvtId>
              <Othr>
                <Id>E20809</Id>
                <SchmeNm></SchmeNm>
                <Issr>ORACLE CORP</Issr>
              </Othr>
            </PrvtId>
          </Id>
        </Dbtr>
        <DbtrAcct>
          <Id>
            <IBAN>FR7030087330086000000000591</IBAN>
          </Id>
        </DbtrAcct>
        <DbtrAgt>
          <FinInstnId>
            <BIC>CMCIFRPPXXX</BIC>
          </FinInstnId>
        </DbtrAgt>
        <CdtrAgt>
          <FinInstnId>
            <BIC>RLBBAT2E083</BIC>
          </FinInstnId>
        </CdtrAgt>
        <Cdtr>
          <Nm>Mrinmoy Sahu</Nm>
          <PstlAdr>
            <Ctry>FR</Ctry>     
            <AdrLine>22 </AdrLine>
          </PstlAdr>
          <Id>
            <PrvtId>
              <Othr>
                <Id>F676869</Id>
                <SchmeNm></SchmeNm>
                <Issr>GOVT OF INDIA</Issr>
              </Othr>
            </PrvtId>
          </Id>
        </Cdtr>
        <CdtrAcct>
          <Id>
            <IBAN>FR7630087330086000000004266</IBAN>
          </Id>
        </CdtrAcct>
        <RmtInf>
            <Ustrd>abc</Ustrd>
          </RmtInf>
      </CdtTrfTxInf>   
      </FIToFICstmrCdtTrf>
    </SCTScfBlkCredTrf>
    alter session set nls_numeric_characters = ".,";
          SELECT Msgid, Msgid1, Sttlmmtd
       FROM   data_table t,Xmltable(Xmlnamespaces('urn:S2SCTScf:xsd:$SCTScfBlkCredTrf' AS "A", 'urn:iso:std:iso:20022:tech:xsd:sct:pacs.008.001.02' AS "B")
                        ,'/A:SCTScfBlkCredTrf/B:FIToFICstmrCdtTrf' Passing t.data Columns
                        Msgid Path 'A:SndgInst'
                        ,Msgid1 Path 'B:GrpHdr/B:MsgId'
                        ,Sttlmmtd Path 'B:GrpHdr/B:SttlmInf/B:SttlmMtd');
    MSGID             ;MSGID1           ;STTLMMTD         ;
                     ;006MSID12511PH712;INGA             ;
    The idea was to :
    1). Map the Column Names for the XPath built using the previous code.
    2). Build the Select statement shown above dynamically based on the Xpath built in the previous code using a PLSQL block, and to process the data by doing a bulk collect on the XML.
    The above XML may contain multiple <FIToFICstmrCdtTrf></FIToFICstmrCdtTrf> nodes.
    Since the name space in the XML varies for each version of the SEPA messages , i need to get the names spaces ALSO to be picked up dynamically and parse the XML data based on the select statement as shown above.
    Could you please guide me with
    1). Is the approach taken appropriate?
    2). Any alternative approach should be looked for ?
    3). How to extract the name spaces available in the XML?
    Thanks.

  • Delete temporary tables from namespace /BI0/0W - Failed to delete BPC Dim

    Hi guys,
    we have a problem while trying to delete a BPC Dimension which is no more used in any Application.
    Dimension deletion fails because BW InfoObject deletion fails. From SLG1 we see there are some reference still in use.
    Data Element /B28/OIJ2D30F1 is used in a couple of tables (/BI0/0W00000231 and /BI0/0W00000233).
    These tables seems to be "where used list" tables.
    We found an OSS Note [1042921|https://service.sap.com/sap/support/notes/1042921] related to DB6.
    But it is not suitable: we are on ORACLE.
    Anyway it says:
    you may have to delete temporary tables from namespace /BI0/0W*, which also use the data element
    These are exactly our symptoms
    Does anyboy of you know how to delete this tables in /BI0/0W namespace?
    Package is blank
    SE11 -> Delete requires to register the object (created by BPC_ADMIN)
    Thanks in advance
    GFV

    in the table ddd02l you can see the temporary table..
    TCode db02, you can ask your basis team to delete temp  table...you can see it 'under missing table and indexe'

  • XML News content modification problem in Portal application

    Hi,
    We are trying to update the xml news content in Portal application with KM API.
    We are getting following exception while updating the content.
    javax.xml.transform.TransformerException: Namespace fixup failed. Prefix 'xsi' used in attribute 'xsi:noNamespaceSchemaLocation' is not declared anywhere
    Please let me know what's to be done
    Thanks

    Hello,
    I faced the same problem in a similar implementation: Message "Namespace fixup failed. Prefix 'xsi' used in attribute 'xsi:noNamespaceSchemaLocation' is not declared anywhere".
    When looking at the attributes of the org.w3c.dom.Document, I saw that the namespace URI of xsi was already null after parsing.
    The solution which made it work for me was
    factory.setNamespaceAware(true);
    before parsing the XML text. The URI of xsi was then the one provided by the document.
    P.S.: Unfortunately, the error message did not pop up in this test code:
    package mytests;
    import java.io.StringReader;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import junit.framework.TestCase;
    import org.w3c.dom.Document;
    import org.xml.sax.InputSource;
    import com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl;
    public class XmlFormsHelperTest2 extends TestCase {
        Document doc;
        String xmldoc =
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
                + "<News_Header_v2 xmlns:xf=\"http://www.sapportals.com/wcm/app/xmlforms\" xmlns:xsi=\"http//www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"/etc/xmlforms/News_Header_v2/btexx_News_Header_v2-Schema.xml\">"
                + "<text>This is the main text</text>" + "</News_Header_v2>";
        protected void setUp() throws Exception {
            super.setUp();
        public void testToDoc() throws Exception {
            Document doc = setupDocumentSap(xmldoc);
            assertEquals("News_Header_v2", doc.getDocumentElement().getTagName());
            assertEquals("This is the main text", doc.getDocumentElement().getFirstChild().getTextContent());
        public void testFromDoc() throws Exception {
            Document doc = setupDocumentSap(xmldoc);
            String actual = xmlToString(doc);
            assertEquals(xmldoc, actual);
         private Document setupDocument(String xmltext) throws Exception {
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            factory.setValidating(false);
            factory.setCoalescing(true);
            DocumentBuilder builder = factory.newDocumentBuilder();
            return builder.parse(new InputSource(new StringReader(xmltext)));
        private Document setupDocumentSap(String xmltext) throws Exception {
            DocumentBuilderFactory factory = new DocumentBuilderFactoryImpl();
            factory.setValidating(false);
            factory.setCoalescing(true);
            //factory.setNamespaceAware(true);
            DocumentBuilder builder = factory.newDocumentBuilder();
            return builder.parse(new InputSource(new StringReader(xmltext)));
        public static String xmlToString(Document xmlDocument) throws Exception {
            Source xmlSource = new DOMSource(xmlDocument);
            StringWriter stringWriter = new StringWriter();
            Result outputTarget = new StreamResult(stringWriter);
              TransformerFactory.newInstance().newTransformer().transform(xmlSource, outputTarget);
            return stringWriter.getBuffer().toString();

  • Looping and Deleting XML Nodes

    A bit perplexed about what is likely a simple problem.
    Say I have the following XML (myXML):
    <stories>
    <story id="1"/>
    <story id="2"/>
    <story id="3"/>
    <otherNode id="15"/>
    <otherNode id="15"/>
    </stories>
    I want to delete nodes with id's of one and two.
    So I currently have:
    for (var nodeIndex in myXML.story) {
    var nodeValue = myXML.story[nodeIndex];
    if (nodeValue != undefined) {
    if (nodeValue.@id == "1" || nodeValue.@id == "2") {
    delete myXML.story[nodeIndex];
    The problem: After deleting the node with id="1" the very next iteration is the node with id="3" - the node with id="2" is never read.
    While it totally makes sense to me, my only dummified solution was to switch to a numeric loop and use nodeIndex-- when I delete a node. But that seems rather unelegant.

    Hi,
    elegant:
    delete myXML.story.(@id = '1')[0];
    delete myXML.story.(@id = '2')[0];
    But you should know that you have only one element with this id.

  • [svn] 1313: Fix for the use namespace problems we've been having with ASC ( I hope).

    Revision: 1313
    Author: [email protected]
    Date: 2008-04-20 09:41:41 -0700 (Sun, 20 Apr 2008)
    Log Message:
    Fix for the use namespace problems we've been having with ASC (I hope). The problem was that the use directive was being defined after we had called finish package. The UseDirectiveNode has a pkgdef ptr, and does different things depending if that ptr is null or not. It should not be null when the UseDirective is inside the package - but since we were generating the UseDirectiveNode after we had called finishPackage the UseDirectiveNode didn't have it's pkgdef ptr set, and so things went awry as the package didn't get set up with all the correct open namespaces. I haven't tested this in authoring/flex but I am pretty sure that this will fix all the problems we're seeing.
    Modified Paths:
    flex/sdk/trunk/modules/asc/src/java/macromedia/asc/parser/Parser.java

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • How must getElementsByTagName work on an xml file with namespaces?

    Hello together,
    is there any normative document, which specifies
    which nodes must be returned by
    the org.w3c.dom.Document method
    getElementsByTagName when which was
    created by a namespace aware dom parser
    from an xml file containing namespaces?
    In other words:
    when you have an xml file:
    <someprefix:somenode xmlns:someprefix="http://someuri">
    <someprefix:innertag>
    <someprefix:mostinnertag>
    </someprefix:mostinnertag>
    <someprefix:mostinnertag>
    </someprefix:mostinnertag>
    </someprefix:innertag>
    </someprefix>
    and you call
    document.getElementsByTagName( ... );
    1) How many nodes must be returned when giving
    "mostinnertag" as parameter?
    2) How many nodes when giving "someprefix:mostinnertag" as parameter?
    Is it allowed to use the "non namespaceaware"
    method and not "getElementsByTagNameNS"?
    I know:
    a) xerces returns 2 nodes when using
    alternative 2 and none with alternative 1
    b) oracle xml parser returns 2 nodes when using
    alternative 1 and none when using alternative 2
    Which implementation is right?
    Yours
    Stefan

    I've got some problems with this methos and xerces too.
    Perhaps the two implementations (xerces and oracle) are different. I mean xerces implementation gives you nodes of this name but without namespace and oracles's implementation gives you modes with namespace whose unprefix-name is "mostinnertag".

  • Please help with namespace problem

    Hello,
    I am trying to display a gif image an I have a namespace problem.
    Here is my xml document:
    <?xml version='1.0'?>
    <?xml-stylesheet type="text/xsl" href="authors.xsl"?>
    <authors>
    <author>
    <name>Mike Galos</name>
    <nationality>French</nationality>
    </author>
    <author>
    <name>Cynthia Randall</name>
    <nationality>Canadian</nationality>
    </author>
    </authors>
    Here is my xsl stylesheet:
    <?xml version='1.0'?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="//author">
    <image     xmlns:xlink="http://www.w3.org/1999/xlink"
                   xlink:type="simple"
                   xlink:href="logo.gif"
                   xlink:show="embed"/>
    </xsl:template>
    </xsl:stylesheet>
    I want the browser to diplay the gif image but it is only showing the image icon and not the actual gif image.
    Can anyone please help??
    Thanks in advance,
    Balteo.

    do you use a special browser?
    if not, do you really expect a standard browser to understand this kind of non-HTML image tag?
    <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:show="embed" xlink:href="logo.gif" xlink:type="simple">check HTML 4.0 (http://www.devguru.com/Technologies/html/quickref/html_img.html)
    or XHTML(http://www.devguru.com/Technologies/xhtml/quickref/xhtml_img.html)
    for the correct tag syntax.

  • How to send data one row at a time from xml to flex

    I want to setTimerEvent while sending data from xml to flex, one row at a time.
    I have attached the xml.
    Thanks in advance.

    Hi Greg,
    Thanks for the reply. You must have seen the xml which i have attached.Here is the .mxml code which i have written:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="accountData.send()">
    <mx:Script>
    <![CDATA[
    import mx.controls.*;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import mx.collections.ArrayCollection;
    [Bindable]
    private var AccountInformation:ArrayCollection;
    private function AccountHandler(evt:ResultEvent):void
        AccountInformation = evt.result.xml.AccInfo;
    private function faultHandler(evt:FaultEvent):void
        var faultMessage:String = "Could not connect with XML file";
        Alert.show(faultMessage, "Error opening file");
    ]]>
    </mx:Script>
    <mx:HTTPService id="accountData" url="pgm1.xml" result="AccountHandler(event)" fault="faultHandler(event)"  />
    <mx:DataGrid x="20" y="24" width="950" dataProvider="{AccountInformation}" />
    </mx:Application>
    This reads and displays all the rows. But I want to display single row at a time with sometime time gap between the display of two consecutive rows.I am new to flex and this is my first code, so need your help on this.
    I hope i have made myself clear. If there is anything else please let me know.
    Looking forward to some solution.
    Thanks in advance.
    Regards,
    praj58

  • Delete xml version in xml file

    Hello,
    I have a strange thing to do. I need to delete xml version tag (<?xml version="1.0" encoding="utf-8" ?>) from en xml file. I use a receiver file adapter and I want to know how it's possible to delete this tag.
    I need to do that as receiving application collects xml messages and adds xml version in collected xml file.
    Thanks in advance,
    Cédric

    hi Udo,
    >>>and clever...
    so it should be you who proposed it:)
    BTW
    I'm not sure if with XSLT you won't have to
    do it in the commnication channel (and not in the interface mapping) - (the xslt mapping)
    but I cannot test it right now
    Regards,
    michal

  • Using XSLT to extract value of a XML node with namespace

    I have a XML source code here.
    <?xml version="1.0" encoding="utf-8" ?>
    <rss version="2.0" xmlns:job="http://www.pageuppeople.com">
      <channel>
        <title>SMH Jobs</title>
        <link>internalrecruitment.smhgroup.com.au/jobsrss.ashx?stp=di</link>
        <description>A listing of jobs available here</description>
        <item>
          <title>eCommerce Optimisation Advisor</title>
          <description>A new and exciting opportunity exists for an experienced eCommerce Advisor to join</description>
          <job:location PUReferenceID="3711">Sydney - Inner Suburbs & CBD</job:location>
        </item>
      </channel>
    </rss>
    I want to use XSLT to extract value of a XML node with namespace <job:location>, and the returned value should be string 'Sydney - Inner Suburbs & CBD'. I tried a few XSL code below, but failed with error or nothing was returned.
    <xsl:value-of select="job:location" disable-output-escaping="yes"/>
    <xsl:value-of select="job/location" disable-output-escaping="yes"/>
    <xsl:value-of select="job\location" disable-output-escaping="yes"/>
    <xsl:value-of select="location" disable-output-escaping="yes"/>
    This might be an easy question for you, but I would appreciate if anyone can help.

    Hi Suncorp IT Learner,
    We need to tell the XSLT that some elements are in another namespace. Copy the xmls declarations for the prefixes you need to use. Then use the xsl format as:
    <xsl: value-of select=”job:location/@PUReferenceID”/>
    In following issue, Chriztian has a good explanation:
    http://our.umbraco.org/forum/developers/xslt/33353-XSLT-reading-XML-attribute-value
    Thanks,
    Qiao Wei
    TechNet Community Support

  • BPEL SCA: XML-20129: (Error) Namespace prefix 'ui' used but not declared.

    SOASuite 11g
    Oracle Weblogic Server 10.3.3
    Oracle Solaris on SPARC (64-bit) 10
    Database: Oracle Server - Enterprise Edition 10.2.0.5
    When I start the SOA domain server, I find the following in the log file:
    <Feb 25, 2011 10:41:23 AM CET> <Error> <org.apache.commons.digester.Digester> <BEA-000000> <Parse Error at line 9 column 79: <Line 9,
    Column 79>: XML-20129: (Error) Namespace prefix 'ui' used but not declared.
    org.xml.sax.SAXParseException: <Line 9, Column 79>: XML-20129: (Error) Namespace prefix 'ui' used but not declared.
    at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:422)
    at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:287)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:342)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:226)
    at org.apache.commons.digester.Digester.parse(Digester.java:1785)
    at oracle.fabric.composite.Parser.parseComposite(Parser.java:132)
    at oracle.integration.platform.kernel.WLSFabricKernelInitializer.deployComposite(WLSFabricKernelInitializer.java:493)
    at oracle.integration.platform.kernel.WLSFabricKernelInitializer.prepareCompositeDeployments(WLSFabricKernelInitializer.java:
    239)
    at oracle.integration.platform.kernel.WLSFabricKernelInitializer.init(WLSFabricKernelInitializer.java:127)
    at javax.servlet.GenericServlet.init(GenericServlet.java:241)
    at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
    at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
    at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1976)
    at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1950)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1869)
    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3126)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1512)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
    at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
    at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
    at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
    at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
    at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
    at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
    at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
    at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
    at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
    at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
    at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    >
    My composite.xml is:
    <composite name="JIPSYHandleRTOTaskEBF" revision="1.0" mode="active" state="on"
    xmlns="http://xmlns.oracle.com/sca/1.0"
    xmlns:ui="http://xmlns.oracle.com/soa/designer/"^M
    xmlns:xs="http://www.w3.org/2001/XMLSchema">^M
    <import location="GetTimeoutPeriod.wsdl" namespace="http://xmlns.oracle.com/pcbpel/adapter/db/GetTimeoutPeriod/"/>
    <service ui:wsdlLocation="JIPSYHandleRTOTaskEBF.wsdl" name="client">
    </composite>
    But when it has been deployed, I see that this has been changed into:
    <composite name="JIPSYHandleRTOTaskEBF" revision="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <import location="GetTimeoutPeriod.wsdl" namespace="http://xmlns.oracle.com/pcbpel/adapter/db/GetTimeoutPeriod/"/>
    <service ui:wsdlLocation="JIPSYHandleRTOTaskEBF.wsdl" name="client">
    </composite>
    (I exported this from MDS).
    Apparently, some namespaces are stripped.
    This appears to happen during the deploy (using ant), because the version in the generated jar file is already missing the namespaces.
    The BPEL processes appear to work fine though.
    Why is this happening and how can I prevent these errors?

    I've fiddled around with the file composite.xml and found the following workaround:
    If I change the start of the file to:
    <?xml version="1.0" encoding="UTF-8"?>
    <composite name="JIPSYUpdateWorkflowReqABCSImpl"
    xmlns="http://xmlns.oracle.com/sca/1.0"
    xmlns:ui="http://xmlns.oracle.com/soa/designer/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    revision="1.0"
    mode="active"
    state="on">
    it remains unchanged and the errors during deployment are gone.

  • How to receive XML from Flex HTTP POST

    Hi,
    We curreontly have a setup where we have a FLEX frontend send an XML through a HTTP POST and awaiting a response also in XML. On the backend this is handled relatively simply by a PHP script that basically does the following:
    read data (in XML)from FlEX HTTP POST into a new temp XML file.
    execute a c++ program with the XML file as one of the parameter.
    return the result to FLEX
    We have decided to move to BlazeDS for various reasons.
    Looking at the examples bundled with BlazeDS they have a jsp example that returns an XML result to FLEX so that part is fine. I am trying to find an example of JSP (or Servlet) that is able to read the XML data from FLEX and write it into a temp XML file. I would then try to use runtime.exec to invoke a local C++ program to process the XML file the result of which will be sent back to FLEX.
    Any help will be very much appreciated!

    <div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>I&#8217;d avoid calling an executable just to process XML &#8211;your<br />application server would provide enough support for reading and writing XML, no?<br />Also, if you&#8217;re only planning on working with XML then even BlazeDS might<br />be overkill because its focus is on sending strongly typed ActionScript data efficiently<br />to and from a client (it&#8217;s true that it does have a proxy service, but<br />that is not involved with processing the actual XML data).<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>How complex is your XML? Do you need to resolve ids and<br />references or can you parse it top down in a single pass? There are several<br />well known libraries in Java for dealing with XML &#8211; the choice depends on<br />how you need to interact with the XML. Most of them take an InputStream as a<br />source for reading XML and you can get the InputStream from the servlet<br />request. Googling should turn up numerous examples.<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Pete<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><br /><br /><div><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> khwong<br />[mailto:[email protected]] <br><br /><b>Sent:</b> Sunday, September 28, 2008 12:09 PM<br><br /><b>To:</b> [email protected]<br><br /><b>Subject:</b> How to receive XML from Flex HTTP POST<o:p></o:p></span></p><br /><br /></div><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new discussion was started by<br />khwong in <br><br /><br><br /><b>General Discussion</b> --<br><br />  How to receive XML from Flex HTTP POST<br><br /><br><br />Hi, <br><br /><br><br />We curreontly have a setup where we have a FLEX frontend send an XML through a<br />HTTP POST and awaiting a response also in XML. On the backend this is handled<br />relatively simply by a PHP script that basically does the following: <br><br /><br><br />read data (in XML)from FlEX HTTP POST into a new temp XML file. <br><br />execute a c++ program with the XML file as one of the parameter. <br><br />return the result to FLEX <br><br /><br><br />We have decided to move to BlazeDS for various reasons. <br><br /><br><br />Looking at the examples bundled with BlazeDS they have a jsp example that<br />returns an XML result to FLEX so that part is fine. I am trying to find an<br />example of JSP (or Servlet) that is able to read the XML data from FLEX and<br />write it into a temp XML file. I would then try to use runtime.exec to invoke a<br />local C++ program to process the XML file the result of which will be sent back<br />to FLEX. <br><br /><br><br />Any help will be very much appreciated! <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b69b23">How to receive XML from<br />Flex HTTP POST</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b69b23!folder=.3c061a83">unsubscribe</a>< br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div><br /><br /></div>

Maybe you are looking for

  • I believe my computer may have a virus. Can someone help?

    Lately ive been worried that my MacBook pro has a virus. Today i went to "Finder" and saw that i had shared files going--ive never shared any files. The location says "Neighborhood". Also, i went to my activity monitor and saw that there was a file c

  • Right clicking no longer works in Safari

    Just yesterday, I started experiencing a strange problem with Safari--the right mouse button no longer works. I also tried the right clicking option with command + clicking on the touchpad and that doesn't work either. Right clicking works outside th

  • Photoshop is auto correcting contrast... on its own.

    Hello all,  I'm simply trying to increase the contrast of a black and white image so the whites are really hot and the blacks are really black. (I've done this many times before.) But now, no matter how I try to do this, (ie. levels, channel mixer, e

  • Third party battery recommendation

    Hi all, I am thinking about buying a new battery for my 15" Powerbook (FW 800). Anyone have recommendations for a good third party battery? I've found numerous references to the NuPower battery (though, does it matter that it's 11.1 V instead of 10.8

  • Diff between Compounded chara & Refrence chara

    Hi diff between Compounded chara & Refrence chara Thanks Kawal