XML question on textnode null value

Hi,
I don't known XML use, I'm learning.
My question is
If in the DomDocument newsXML I append to "node" the newelement and a textnode, initially with not null value. Why, then, can't I setNodeValue to Null?
newelement:=xmldom.createelement(newsXML,element_name);
newnode:=xmldom.appendchild(node,xmldom.MAKENODE(newelement));     
Textitem:=xmldom.createTextNode(newsXML,value);
newnode:=xmldom.appendchild(newnode,xmldom.MAKENODE(Textitem));
xmldom.setNodeValue(newnode,null); not possible!!!
Why?
Yet,
is There another way to append a leaf null in the tree of xml?
Thanks!

I maybe wrong about this because my XML is a little rusty, but I thing a Node is null when we create it. It is only by adding a TextNode to it that we make it not null.
If that's the wrong answer I will just suggest you visit one of the OTN XML forums which you can find here.
Cheers, APC

Similar Messages

  • XML Paser retuns The null Values

    Hi Im using Dom parser to parse a file .
    The parser work fine & it retrevies the elements but when im trying to retreive the Node Value its returning null value
    What could be wrong ???
    Thanks in advance
    Balaji

    Can someone please help me with this problem
    Thanks.

  • How to find out the null values in table

    hi experts,
    my version is oracledb10g:
    i h'd simple doubts.
    for eg:
    create table ex1( e varchar2(20));
    insert into ex1 (null).
    insert into ex1(e)
    count will be: 2
    i can easily found out the value 'e'.
    so my question is:
    how can i found out the null values in the table and i want to delete the null values from the table.

    ADF 7 wrote:
    hi experts,
    my version is oracledb10g:
    i h'd simple doubts.
    for eg:
    create table ex1( e varchar2(20));
    insert into ex1 (null).
    insert into ex1(e)
    count will be: 2That depends what you count. If you issue count(*) you are asking Oracle "how many rows are there". If you issue a count(<column_name>) you are asking Oracle "how many not null values of <column_name> are there".
    ADF 7 wrote:
    i can easily found out the value 'e'.
    so my question is:
    how can i found out the null values in the table and i want to delete the null values from the table.
    delete from <table_name>
    where <column_name> is null;Ideally you'd just place a NOT NULL constraint on the column in question, thereby prohibiting NULL values from entering into the system (assuming your business requirement is that the column MUST always have a value).

  • About xml and null values in 10g

    Hi, I have an UCM GetFile webservice component wich receives 4 arguments, two of them are null values (rendition and extraPops), and the xml request generated by obpm is:
    <GetFileByName xmlns="http://www.stellent.com/GetFile/">
      <dDocName>V_123410</dDocName>
      <revisionSelectionMethod>latestReleased</revisionSelectionMethod>
      <rendition/>
      <extraProps/>
    </GetFileByName>The problem is: On UCM web service, an empty tag like <rendition/> is treated like a "empty string" value, instead of a null value, and then the response i get isn't the expected.
    What I want do to is change this behavior, and when I put null values in requests, the obpm should not write those tags. Is that possible?
    Should be like that:
    <GetFileByName xmlns="http://www.stellent.com/GetFile/">
      <dDocName>V_123410</dDocName>
      <revisionSelectionMethod>latestReleased</revisionSelectionMethod>
    </GetFileByName>Thanks!

    Hi,
    I have question regarding aggregates. It's possible to read data from BW aggregates? We have webi reports on a SAP BW multi cube and we would like to optimize retriving query.
    >> Because you are using the BW Query as the source all the items that you have done so far in terms of aggregation, indexing, ... is all valid and there are no specific steps required to leverage it with Web Intelligence. Make sure the aggregates are "correct" meansing that they do reflect what you are asking for in the Web Intelligence query panel
    How can we filter in webi query null (#) values. If we create condition that some variabe is diffrent from # we still get null (#) values in report.
    >> You should be able to create a variable. in case you tried that already could you be more specific ?
    thanks
    Ingo

  • Getting null value while parsing "XML String" with  encoding WINDOWS-1252.

    Hi,
    when I am converting the Follwoing "xml string " to Document, I am getting the "null" as a document value.
        String strXML =  "<?xml version="1.0" encoding="WINDOWS-1252"?>
                              <category name="SearchByAttributes" value="Search By Attributes">
                                <item name="ORDER_LINE_ID" description="Application Search Attributes" >
                                   <attribute name="Sequence" value="0001"/>
                                 </item>
                                </category>"      
    My "xml string" has the encoding vaule: WINDOWS-1252.
    I am using the following code to convert the "xml string" to Document. I am getting the Document values as a "null" while converting the above "string xml"
            String strXML = //my above string xml.
            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
            docBuilderFactory.setIgnoringElementContentWhitespace(true);
            docBuilder = docBuilderFactory.newDocumentBuilder();
            doc = docBuilder.parse(new InputSource(new StringReader(strXML)));              
            System.out.println("doc value.."+doc)//I am getting null value for "doc".
    Can anyone help me to resolve the issue.

    Thagelapally wrote:
    I am coverting the below "XML string" to Document, once it is converted I am reading that Document,which have an "attribue" Element in.
      String strXML = "<?xml version="1.0" encoding="WINDOWS-1252"?>
    <category name="SearchByAttributes" value="Search By Attributes">
    <item name="ORDER_LINE_ID" description="Application Search Attributes" >
    <attribute name="Sequence" value="0001"/>
    </item>
    </category>" I am using the above code to read the Document. When run the code in "OC4J Server" and using Jdeveloper as an editor,I am able to perfectly read the "attribute" element in the document with out any problem.Println statement printing as I expected.
    System.out.println("Element Name..."+listOfAtt.getNodeName());
    //getting Element Name as...."attribute"(as expected)
    System.out.println("Element Attibrute list....."+elementAtt);
    //getting Element Attribute list as an...."oracle.xml.parser.v2.XMLAttrList@afe"But when run the same code(reading the same Document) in Tomcat and Eclipse,println satatement not printing as i expected.
    System.out.println("Element Name..."+listOfAtt.getNodeName());
    //getting Element Name as...."#text"(I am expecting output value "attribute" but it is printing "#text" which i don't know)
    System.out.println("Element Attibrute list....."+elementAtt);
    //getting Element Attribute list as an...."null"(I am expecting output value object reference but it is printing "null"
    (without the rest of the code, i'm guessing that) most likely you are grabbing the first child node of the item element. however, you are not accounting for some text nodes that are most likely in that list, like the whitespace between the item element and the attribute element. please go read some tutorials on xml, there are thousands of them out there, and they will answer all you initial questions much more efficiently than posting each step to the forums.

  • Script for generating XML file ... problem with null values

    Greetings everyone,
    i come here with a question that troubles me for some time now. I have a script which i run from SQLPLUS every now and then to generate an XML file.
    Problem is that data which needs to be in XML is not allways <> NULL and i need to hide those tags that are empty </tag>.
    I will post below my script and if you could help me with it it would be really great!
    Thanks for reading!
    set long 20000000
    set long 20000000
    set linesize 32000
    SET ECHO OFF
    SET TRIMSPOOL on
    SET HEADING OFF
    SET PAGESIZE 50000
    SET VERIFY OFF
    SET FEEDBACK OFF
    SET TERMOUT OFF
    spool C:\test.xml
    set serveroutput on
    begin
      dbms_output.put_line('<?xml version="1.0" encoding="utf-8" ?>');
    end;
    SELECT
    XMLELEMENT("ReportRoot",XMLATTRIBUTES('http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi", 'http://www.w3.org/2001/XMLSchema' as "xmlns:xsd" , '1.0' as "Version",sysdate as "CreationDate",to_char(sysdate,'hh:mm:ss') as "CreationTime",'1524544845' as "id"),
    XMLELEMENT("Porocila",XMLELEMENT("JOLY",(SELECT XMLAGG (XMLELEMENT("RefNrReport",replace('SON'||to_char(ref_ST,'00000'),' ',''))) from access_table_2 where ref_ST = &1),
    XMLELEMENT("ReportDate",sysdate),XMLELEMENT("Labeling",'545254450'),
    (SELECT XMLAGG     (XMLELEMENT("Reportf",
                                                                     XMLELEMENT("access",access),
                                                                     XMLELEMENT("date",date),
                                                                     XMLELEMENT("datep",datep),
                                                                     XMLELEMENT("ModificationInfo",'M'),XMLELEMENT("ModificationReason",modireason)))
                                                 from v_xml_test where id_dok = &1 and ind_print = '1'))))
      .extract('/*')
      from dual
         spool off
    exitNow lets pretend that XMLELEMENT("datep",datep), is sometimes NULL and i do not want to display it.

    may be
    with t as
    select sysdate datep from dual union all
    select null datep from dual
    select xmlagg(xmlelement("Reportf",
                             case when datep is not null then XMLELEMENT("datep", datep)
                             end
      from t

  • Need help Take out the null values from the ResultSet and Create a XML file

    hi,
    I wrote something which connects to Database and gets the ResultSet. From that ResultSet I am creating
    a XML file. IN my program these are the main two classes Frame1 and ResultSetToXML. ResultSetToXML which
    takes ResultSet & Boolean value in its constructor. I am passing the ResultSet and Boolean value
    from Frame1 class. I am passing the boolean value to get the null values from the ResultSet and then add those
    null values to XML File. When i run the program it works alright and adds the null and not null values to
    the file. But when i pass the boolean value to take out the null values it would not take it out and adds
    the null and not null values.
    Please look at the code i am posing. I am showing step by step where its not adding the null values.
    Any help is always appreciated.
    Thanks in advance.
    ============================================================================
    Frame1 Class
    ============
    public class Frame1 extends JFrame{
    private JPanel contentPane;
    private XQuery xQuery1 = new XQuery();
    private XYLayout xYLayout1 = new XYLayout();
    public Document doc;
    private JButton jButton2 = new JButton();
    private Connection con;
    private Statement stmt;
    private ResultSetToXML rstx;
    //Construct the frame
    public Frame1() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    //Component initialization
    private void jbInit() throws Exception {
    //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
    contentPane = (JPanel) this.getContentPane();
    xQuery1.setSql("");
    xQuery1.setUrl("jdbc:odbc:SCANODBC");
    xQuery1.setUserName("SYSDBA");
    xQuery1.setPassword("masterkey");
    xQuery1.setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
    contentPane.setLayout(xYLayout1);
    this.setSize(new Dimension(400, 300));
    this.setTitle("Frame Title");
    xQuery1.setSql("Select * from Pinfo where pid=2 or pid=4");
    jButton2.setText("Get XML from DB");
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    catch(java.lang.ClassNotFoundException ex) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(ex.getMessage());
    try {
    con = DriverManager.getConnection("jdbc:odbc:SCANODBC","SYSDBA", "masterkey");
    stmt = con.createStatement();
    catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    jButton2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    jButton2_actionPerformed(e);
    contentPane.add(jButton2, new XYConstraints(126, 113, -1, -1));
    //Overridden so we can exit when window is closed
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    System.exit(0);
    void jButton2_actionPerformed(ActionEvent e) {
    try{
    OutputStream out;
    XMLOutputter outputter;
    Element root;
    org.jdom.Document doc;
    root = new Element("PINFO");
    String query = "SELECT * FROM PINFO WHERE PID=2 OR PID=4";
    ResultSet rs = stmt.executeQuery(query);
    /*===========This is where i am passing the ResultSet and boolean=======
    ===========value to either add the null or not null values in the file======*/
    rstx = new ResultSetToXML(rs,true);
    } //end of try
    catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    ======================================================================================
    ResultSetToXML class
    ====================
    public class ResultSetToXML {
    private OutputStream out;
    private Element root;
    private XMLOutputter outputter;
    private Document doc;
    // Constructor
    public ResultSetToXML(ResultSet rs, boolean checkifnull){
    try{
    String tagname="";
    String tagvalue="";
    root = new Element("pinfo");
    while (rs.next()){
    Element users = new Element("Record");
    for(int i=1;i<=rs.getMetaData().getColumnCount(); ++i){
    tagname= rs.getMetaData().getColumnName(i);
    tagvalue=rs.getString(i);
    System.out.println(tagname);
    System.out.println(tagvalue);
    /*============if the boolean value is false it adds the null and not
    null value to the file =====================*/
    /*============else it checks if the value is null or the length is
    less than 0 and does the else clause in the if(checkifnull)===*/
    if(checkifnull){ 
    if((tagvalue == null) || tagvalue.length() < 0 ){
    users.addContent((new Element(tagname).setText(tagvalue)));
    else{
    users.addContent((new Element(tagname).setText(tagvalue)));
    else{
    users.addContent((new Element(tagname).setText(tagvalue)));
    root.addContent(users);
    out=new FileOutputStream("c:/XMLFile.xml");
    doc = new Document(root);
    outputter = new XMLOutputter();
    outputter.output(doc,out);
    catch(IOException ioe){
    System.out.println(ioe);
    catch(SQLException sqle){

    Can someone please help me with this problem
    Thanks.

  • Null value for int and datetime date type in xml schema

    hi:
    I am embarrassed by a qustion in xml schema; i defined a xml schema file like
    this:
    <elementFormDefault="qualified" attributeFormDefault="qualified">
    <xs:element name="test">
    <xs:annotation>
    <xs:documentation>Comment describing your root element</xs:documentation>
    </xs:annotation>
    <xs:complexType>
    <xs:sequence>
    <xs:element name="name" type="xs:string"/>
    <xs:element name="password" type="xs:string" nillable="true"/>
    <xs:element name="user" type="xs:int" nillable="true"/>
    <xs:element name="s_time" type="xs:dateTime"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    and I send this file to workflow clientrequest() node, I wanted to receive data
    in this schema file.but when i send null value to the element "user" and "s_time"
    in workshop test tool(test soap),and use function in xmlbean like isNilUser or
    isNilStime, one error occur.
    I don't kown why, I had to ask the engineer of bea in china, one told me a bug.
    is that true?

    Visakh16 I cant agree more with you on it, it is good but in production u cant have them change maxrows. I think
    Patrick  Hurst is a better option. debug the package have it running and move up
    Please mark as helpful and propose as answer if you find this as correct!!! Thanks,Dia Agha .
    Hmm..Why do you need to change it in production?
    What I suggested was to tweak the setting in dev machine so that it interprets the Excel file datatypes correctly when doing development. Once mapping is set correctly then it will work fine when in production or in any other environment. The tweaking is
    just to make sure it interprets the datatype correctly at design time and has nothing to do with production deployment 
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to avoid the null values from xml publisher.

    I am creating a report which have the claim numbers with the values CLA001,CLA111,null, null . when i preview my report it is showing some spaces for null values also. How can i avoid the spaces from the report.
    I am giving for loop for the claim numbers in the template.
    <?for-each:ROW?> <?sort:CLAIMNUMBER;'ascending';data-type='text'?>
    <?CLAIMNUMBER?>
    <?end for-each?>
    Please help me out to solve this problem.
    Thanks,
    vasanth.

    Hi Sheshu,
    According to your description, you are experiencing the null values and infinity values when browser the calculated measure, right?
    Based on my research, the issue is caused by that dividing a non-zero or non-null value by zero or null. In this cases, we need to check for division by zero to avoid this situation. Here is the sample query for you reference.
    IIF(
    Measures.[Measure B]=0,null,
    Measures.[Measure A] / Measures.[Measure B]
    If you have any questions, please feel free to ask.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Missing XML elements are no longer treated as NULL value (MDM 7.1 SP04)

    Hello,
    We have a problem with importing XML files with missing XML segments (and hence missing XML fields) in XML file.
    In MDM 7.1 SP03 (7.1.03.72), missing fields within a missing segment (so no tags at all for segment and fields) were still represented in the import manager as NULL value in the value mapping, making it possible to do value mapping and to import this NULL value into MDM (overwriting existing values in MDM).
    As of MDM 7.1 SP04 (we are running 7.1.04.126) the missing fields within an missing segment are no longer represented in the import manager as NULL value in value mapping!
    I don't know if that's a new 'feature' in SP04 but we are now running into following problem:
    - We are importing customer data from ECC into MDM, where some segments are optional
    - The fields within the (optional) segment are mapped to a multi-valued tuple field
    - When we now import a customer that has values for the optional segment, the tuple field gets filled correctly
    - When the optional data is now removed completely from the customer in ECC, we don't get that segment anymore in the XML file (this is how the Idoc works on ECC side, if all entries from the optionel segment are deleted then the complete segment is missing in the XML file)
    - In SP03 we replaced the existing tuple records with the NULL value (leaving 1 empty tuple record, but this is known issue to SAP, so we've accepted this for the moment)
    - In SP04 we cannot replace the existing tuple records anymore, since when complete segment is missing, the fields within that segment gets no value at all (in source values). So we are not able to replace the existing tuple records with NULL/nothing, leaving the 'old' tuple values in MDM!
    Does anyone have solution for this (that also works with SP04)?
    We already tried to replace the complete record in MDM (instead of updating it, this is possible since we always get the latest (and complete) status of a customer), but we are also mapping the remote key, and hence you are not allowed to replace the record during import!
    Other solution could be to have PI add any missing segment into the XML message, but we first want to make sure that this cannot be handled within MDM Import Manager itself.
    Thanks in advance,
    Marcel Herber
    Edited by: P.H.M. Herber on Apr 27, 2010 3:46 PM

    Hi Marcel,
    I haven't tried it with XML file but i hope it may help you.
    long back i need to send one field with value null if it doesn't come in source file and if it comes then original value.
    What i did, i loaded a file which does not have this field, so in MDM Import Manager, under source hierarchy i created a field say ABC and map this field with target field and its value Null with Null, i also save this property in map using configuration options-->Automap fields when loading map = Yes
    So whenever a file come with missing field ABC, automatically this field get created and mapped with target field and its value Null with target Null.  on the other hand, If this field actually comes in Source File(Delimited, Excel) ABC then this field with its original value gets map with target field value. That time it worked fine.
    Just try and revert with result if it helps..
    Else, using PI is the best option to create that missing segment into the XML message.
    Regards,
    Mandeep Saini

  • Null value in Nested table of nested table for xml guru Steve Muench

    The procedure I am using takes xml document with nested levels and insert into single table using DBMS_XMLSave.insertXML.
    I am able to insert into table without any error message but when I am selecting row from table, it is showing null values in all the column of nested table's inner nested table.
    When I am removing nested table's nested table by replacing with object type, it is showing data of object type for the first occurance and ignoring the rest nested occurance.
    Help is greatly appreciated.
    Below is the sql I used to create objects and table:-
    Create or Replace Type addressType as Object
    Line_one     varchar2(40),
    Line_two     varchar2(40),
    City          Varchar2(30),
    State          Varchar2(2),
    zip          Varchar2(10)
    Create or Replace Type ce_reqType as Object
    Status               varchar2(25),
    Status_date          Date,
    type_code          Varchar2(25),
    review_begin_date     Date,
    assigned_review_date     date
    Create or Replace type ce_reqListType
    as table of ce_reqType;
    Create or Replace Type LicenseType as Object
    type_code          Varchar2(10),
    license_number          Varchar2(16),
    ce_requirements      ce_reqListType
    Create or Replace type LicenseListType
    as table of LicenseType;
    Create table IndividualType
    individual_id          Number(9),
    social_security_number Varchar2(9),
    Last_name          varchar2(40),
    First_name          Varchar2(40),
    Middle_name          Varchar2(40),
    Birth_date          Date,
    address          addressType,
    Licenses          LicenseListType
    nested table licenses store as licensestab
    (nested table ce_requirements store as lic_ce_reqtab);

    Maddy wrote:
    dbms_output.put_line('The count is '||bookset.count); --> I can see COUNT =1 (why)Because instead of adding an element to bookset collectionto are assigning (ergo replacing) it a collection containing last fetched book. Use:
    declare
        bookset book_table;
        ln_cnt pls_integer;
    begin
        bookset := book_table(book_obj('madhu','kongara','sudhan'));
        dbms_output.put_line('The count is '||bookset.count); --> I can see COUNT =1
        bookset := book_table(); --> Assigning back to NULL.
        dbms_output.put_line('The count is '||bookset.count); --> I can see count as 0
        for rec in (select * from book) loop --> Now Looping two times.
          dbms_output.put_line(' name > '||rec.name);
          bookset.extend;
          bookset(bookset.count) := book_obj(rec.name, rec.author, rec.abstract);
        end loop;
        dbms_output.put_line('The count is '||bookset.count); --> I can see COUNT =1 (why)
    end;
    The count is 1
    The count is 0
    name > Harry Potter
    name > Ramayana
    The count is 2
    PL/SQL procedure successfully completed.
    SQL> Or better use bulk collect:
    declare
        bookset book_table;
        ln_cnt pls_integer;
    begin
        bookset := book_table(book_obj('madhu','kongara','sudhan'));
        dbms_output.put_line('The count is '||bookset.count); --> I can see COUNT =1
        bookset := book_table(); --> Assigning back to NULL.
        dbms_output.put_line('The count is '||bookset.count); --> I can see count as 0
        select  book_obj(name,author,abstract)
          bulk collect
          into  bookset
          from  book;
        for i in 1..bookset.count loop --> Now Looping two times.
          dbms_output.put_line(' name > '||bookset(i).name);
        end loop;
        dbms_output.put_line('The count is '||bookset.count); --> I can see COUNT =1 (why)
    end;
    The count is 1
    The count is 0
    name > Harry Potter
    name > Ramayana
    The count is 2
    PL/SQL procedure successfully completed.
    SQL> SY.

  • Display xml- tags with NULL - value

    Hello
    is there a way to display a tag while the value is null in this matter :
    select
    xmlforest(AFRAGNR_1, AFRAGNR_2 , AFRAGNR_3 ,AFRAGNR_4 )
    AS XML
    FROM VIEW_ABC WHERE x = v1 and y = v2
    -- result: :AFRAGNR_3 and AFRAGNR_4 is null and not displayed:
    XML
    &lt;AFRAGNR_1&gt;J&lt;/AFRAGNR_1&gt;&lt;AFRAGNR_2&gt;J&lt;/AFRAGNR_2&gt;
    -- by using this, its not the result I want to get,
    select
    xmlelement( "AFRAGNR_1" , AFRAGNR_1 ) AFRAGNR_1
    ,xmlelement( "AFRAGNR_2" , AFRAGNR_2 ) AFRAGNR_2
    ,xmlelement( "AFRAGNR_3" , AFRAGNR_3 ) AFRAGNR_3
    ,xmlelement( "AFRAGNR_4" , AFRAGNR_4 ) AFRAGNR_4
    FROM VIEW_ABC WHERE x = v1 and y = v2
    another way ?
    regards Norbert
    Edited by: astramare on Nov 20, 2008 12:32 PM

    I have the same problem:
    - I need to generate XML in format <element id="1" />
    - I need to pass some null values:
    SELECT XMLElement ( "ShipToAddress"
    , XMLAttributes ( customer_id as "CustomerNo"
    , '' as "Code"
    , substr(name,1,30) as "Name"
    , '' as "Name2"
    , substr(street||' '||house_nr,1,30) as "Address"
    , '' as "Address2"
    , city as "City"
    , last_name ||' '|| first_name as "Contact"
    , phone as "PhoneNo"
    , '' as "CountryCode"
    , fax as "FaxNo"
    , zip_cd||' '||postal_code_extention as "PostCode"
    , '' as "County"
    , email as "EMail"
    , website as "HomePage")) customer
    FROM customers;
    result should be:
    <ShipToAddress CustomerNo="100001004" Code="3" Name="4C
    Cons" Name2="" Address="Metrologielaan" Address2="" City="BRUSSEL" Contact="" PhoneNo="" CountryCode="BE" FaxNo="" PostCode="1130" County="" EMail="" HomePage="" />
    and NOT (this is my result at the moment):
    <ShipToAddress CustomerNo="100001004" Code="3" Name="4C
    Cons" Address="Metrologielaan" City="BRUSSEL" CountryCode="BE" PostCode="1130"></ShipToAddress>;
    Can someone help me with this please?
    Edited by: willeha on Mar 5, 2009 7:18 AM

  • Null values in Numeric fields of Datasets

    I am wondering if anyone has run into this problem before and
    checking to see if anyone has an elegant solution.
    I have a rather large data set. (actually 5 of them on a
    single page) I am sorting certain columns in a table as numbers so
    i assign the variable " ds1.setColumnType("somenumbercolumn",
    "number")" In most cases Spry works great and it sorts by numbers
    properly. The problem is some of the fields in the XML file are
    null and I am trying to sort them as a number. Spry actually
    adjusts for this (as far as i can tell) and treats them like a 0
    which isn't exactly ideal considering there are real zero values in
    the data. I know spry doesn't currently format numbers:
    So here is my question. Does anyone one have a solution to
    fixing null values in a table so that it is still sortable but
    doesn't display a "0" and instead displays something like "--" or
    whatever. I have the option of editing the XML file as well, but I
    still need the table to sort by number.
    If not null values, how about non numeric fields which can
    still be sorted in a numeric column?

    Hi,
    We have an old post that raised a similar problem with yours.
    The post can be found
    here
    For you situation, you should add an if condition for the
    rows that have 0 and to add a custom string instead 0.
    for (var i = 0; i < numRows; i++)
    if(rows
    [ "field_name"] == 0)
    rows[ "field_name" ] = '--';
    Hope this helps you,
    Diana

  • GetParameter() null value

    Hi all,
    We are having a problem using the request.getParameter(String) method. We are using the method to define an argument for a Java Webstart (jnlp mime type) file we are creating with jsp. Other arguments have been successfully created using the request.getServerName() and request.getRequestURI() methods. The getParameter() return value looks fine if printed back to HTML. The jsp file creating the jnlp file is called using an HREF created inside another jsp file as follows:
    <a href="xmlfetch.jsp?filename=mti.xml""></a>
    The param value for filename in each HREF is filled using an String array entry (i.e. +names).
    The xmlfetch.jsp file uses StringBuffers to capture/store the servername, uri and param data as follows:
    StringBuffer svrname = new StringBuffer();
    svrname.append(request.getServerName());
    StringBuffer requri = new StringBuffer();
    requri.append(request.getRequestURI());
    StringBuffer fname = new StringBuffer();
    fname.append(request.getParameter("filename"));
    All 3 variables look ok if dumped in html as follows:
    out.println("svrname=" +svrname);
    out.println("requri=" +requri);
    out.println("fname=" +fname);
    But only the param value is null when the variables are passed as arguments in the jnlp stream as follows:
    <argument><%=svrname.toString()%></argument>
    <argument><%=requri.toString()%></argument>
    <argument><%=fname.toString()%></argument>
    So the question is ... why do the parameter values evaluate to non null when dumped to html but become null when used as an argument for jnlp? AND what is the difference between the strings returned by the 3 request methods we are using as arguments (i.e. why do 2/3 work?).
    ANY HELP APPRECIATED:)
    Greg Hock
    Software Engr
    Northrop Grumman Corp.
    (321) 726-7758
    [email protected]

    I have tried the parameter specification both with and without quotes but either case results in null value for argument going into the Java Webstart (.jnlp) file that I create in the second jsp file (xmlfetch.jsp). What I don't understand is why the parameter looks correct when sent out.println() but is null when not printed and only used for the jnlp app argument. Both the other variables assigned using request.getXXX() methods are ok as arguments...only the parameters passed from the first jsp page (mtiquery.jsp) to the second jsp page (xmlfetch.jsp) become null when used as the jnlp argument.
    Anyone ... please help. :)
    Here is the code for the first jsp page. This page creates a table of filenames each of which has a href link to the second jsp page and passes it's filename as the parameter.
    <%@ page
    language="java"
    import="java.util.*,java.text.*,java.io.*,javax.swing.filechooser.FileFilter"
    %>
    <html>
    <title>MTIX MTI Query Tool</title>
    <body>
    <p>
    <center>
    <h1>JSP MTI QueryTest</h1><br>
    <jsp:include page="copyright.jsp" flush="true"/>
    <br>
    <%=(new java.util.Date())%>
    <%
    String startPath = "../webapps/ATServlets/data/mti";
    File myDir = new File(startPath);
    String myPath = myDir.getCanonicalPath();
    out.println("<br><br><br>Results of Query Path: <br>" myPath "<br><br>");
    String[] filelist = myDir.list();
    out.println("<br>");
    out.println("<center>");
    out.println("<table BORDER COLS=1 width=400>");
    String urlPath = null;
    String hrefPath = null;
    for (int i=0; i<filelist.length; i++)
    urlPath = new String("\"http://judy:8080/ATServlets/jsp/xmlfetch.jsp?filename="+filelist[i]+ "\"");
    hrefPath = new String("<a href=" urlPath ">");
    out.println("<tr><td><center>");
    out.println(hrefPath + filelist[i] + "</a>");
    out.println("</center></td></tr>");
    out.println("</table>");
    out.println("</center>");
    %>
    </center>
    </body>
    </html>
    This first page resulted in source as follows:
    NOTICE that the second jsp page is the HREF and I am using "filename" as the parameter key and the value is assigned (without quotes) to be the filelist entry.
    <html>
    <title>MTIX MTI Query Tool</title>
    <body>
    <p>
    <center>
    <h1>JSP MTI QueryTest</h1><br>
    <html>
    <head>
    <title></title>
    </head>
    <body>
    <p>(c) 1999,2000,2001 Northrop-Grumman All Rights Reserved </p>
    </body>
    </html>
    <br>
    Wed Aug 08 10:01:34 EDT 2001
    <br><br><br>Results of Query Path: <br>/opt/mtix/data/mti<br><br>
    <br>
    <center>
    <table BORDER COLS=1 width=400>
    <tr><td><center>
    MtiOutput.xml
    </center></td></tr>
    <tr><td><center>
    KoreaMTI.xml
    </center></td></tr>
    <tr><td><center>
    testMti.xml
    </center></td></tr>
    <tr><td><center>
    testMti2.xml
    </center></td></tr>
    <tr><td><center>
    testMti4.xml
    </center></td></tr>
    </table>
    </center>
    </center>
    </body>
    </html>
    OK Now here is the second jsp file (xmlfetch.jsp) that is fired up after the table selection. This file creates a stream to the Java Webstart plugin and tries to use the passed parameter as 1 of 3 arguments to the application (see last few lines). The variable fname is used to hold the contents of the getParameter() method.
    <%@ page
    contentType="application/x-java-jnlp-file"
    info="myjnlp"
    import="java.lang.*,java.text.*,java.io.*"
    %>
    <%
    StringBuffer fname = new StringBuffer();
    fname.append(request.getParameter("filename"));
    //fname.append("MtiOutput.xml");
    //out.println("the fname var = " +fname);
    StringBuffer cBase = new StringBuffer();
    cBase.append(!request.isSecure() ? "http://" : "https://");
    cBase.append(request.getServerName());
    if(request.getServerPort() != (request.isSecure() ? 80 : 443))
    cBase.append(':');
    cBase.append(request.getServerPort());
    StringBuffer httpref = new StringBuffer();
    httpref = cBase;
    httpref.append(request.getRequestURI());
    StringBuffer cBase2 = new StringBuffer();
    cBase2.append(!request.isSecure() ? "http://" : "https://");
    cBase2.append(request.getServerName());
    if(request.getServerPort() != (request.isSecure() ? 80 : 443))
    cBase2.append(':');
    cBase2.append("80");
    cBase2.append('/');
    cBase2.append("ATJava");
    cBase2.append('/');
    %>
    <?xml version="1.0" encoding="utf-8"?>
    <!-- JNLP File for downloading xml from servlet -->
    <jnlp
    spec="1.0"
    codebase="<%=cBase2.toString()%>"
    href="<%=httpref.toString()%>">
    <information>
    <title>Catalog Download Application</title>
    <vendor>Northrop Grumman, Inc.</vendor>
    <homepage href="ATJava.init/documents/index.html"/>
    <description>XML Catalog Download Application>
    <description kind="short">A demo.</description>
    <icon href="ATJava.init/images/tomcat.gif"/>
    <offline-allowed/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.2" initial-heap-size="16m" max-heap-size="512m"/>
    <jar href="ATJava.build/ATJava.jars/ATSignedRuntime.jar" download="eager"/>
    </resources>
    <resources>
    <j2se version="1.3" initial-heap-size="16m" max-heap-size="512m"/>
    <jar href="ATJava.build/ATJava.jars/ATSignedRuntime.jar" download="eager"/>
    </resources>
    <application-desc main-class="mtix.XMLFetch">
    <argument><%=fname.toString()%></argument>
    <argument><%=cBase2.toString()%></argument>
    <argument><%=httpref.toString()%></argument>
    </application-desc>
    </jnlp>
    Please HELP/COMMENT if you can.... Gregg

  • Null values coming from JSON

    Ok. heres whats going on. I have a bunch of charts all with
    two series , demand and baseline. About half of them have a null
    value for the last value in demand and of the half 2 have null for
    the entire baseline.
    my problem is one of the afore mentioned 2 charts will not
    show up (chart shows but without lines) unless I iterate through
    and set all null values to zero in the baseline series. Then
    baseline will lie on the x axis(BAD) and demand will show
    correctly(missing the last value because it null, GOOD)
    my question is why? why does demand disappear when baseline
    values are null? here is some code to maybe help you out
    quote:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:myComp="*"
    layout="vertical" viewSourceURL="srcview/index.html"
    preinitialize="srv.send();" uid="theApp">
    <mx:Script>
    <![CDATA[
    import mx.charts.series.LineSeries;
    import mx.charts.chartClasses.Series;
    import mx.charts.AxisRenderer;
    import mx.charts.CategoryAxis;
    import mx.controls.HorizontalList;
    import mx.containers.Panel;
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    import com.adobe.serialization.json.JSON;
    import mx.controls.Alert;
    import mx.utils.ObjectUtil;
    [Bindable]private var ercotDem:Array = new Array();
    [Bindable]private var ercotBase:Array = new Array();
    [Bindable]private var times:Array = new Array();
    private function onJSONLoad(event:ResultEvent):void{
    try{
    // ---- i know this json stuff works.
    // ---- i have printed out the data and cheaked
    // ---- to make sure its goign into the array correctly
    // ---- and i use it all over the place in other files
    var rawData:String = String(event.result);
    var jsonOBJ:Object = (JSON.decode(rawData) );
    ercotDem = jsonOBJ.ERCOT.demand as Array;
    ercotBase = jsonOBJ.ERCOT.baseline as Array;
    times = jsonOBJ.times as Array;
    } catch(err:Error){
    Alert.show(err.message);
    private function popup():void{
    Alert.show("Fail!!");
    ]]>
    </mx:Script>
    <!-- other charts here too -->
    <mx:Panel title="Ercot Demand" height="300" width="600"
    layout="horizontal">
    <mx:LineChart id="linechart_ercot" height="100%"
    width="100%"
    showDataTips="true" dataProvider="{times}"
    mouseSensitivity="50">
    <mx:horizontalAxis>
    <mx:CategoryAxis />
    </mx:horizontalAxis>
    <mx:horizontalAxisRenderer>
    <mx:AxisRenderer canDropLabels="true" canStagger="true"
    />
    </mx:horizontalAxisRenderer>
    <mx:series>
    <mx:LineSeries displayName="Ercot Baseline"
    dataProvider="{ercotBase}" />
    <mx:LineSeries displayName=" Ercot"
    dataProvider="{ercotDem}" />
    </mx:series>
    </mx:LineChart>
    </mx:Panel>
    <mx:HTTPService id="srv" resultFormat="text"
    showBusyCursor="true"
    url="--myserver--"
    result="onJSONLoad(event)" fault="popup()" />
    </mx:Application>
    keep in mind this is only one panel theres about 9 and all of
    them work as expected and the code is all the same.
    any ideas?

    no one has any ideas?

Maybe you are looking for

  • Printing from non airplay WIFI enabled Cannon from iphone

    Is there a way to print from a non airplay WiFi enabled Canon MG6120 from my iphone or ipad using my airport extreme when not in range of my network? Note: when in range or out of range, I use the Printer Pro app - but my computer has to be left ON.

  • Internet bandwidth usage reporting in real time

    Need some guidance with regard to software selection and physical layout. I've been asked to provide reports on internet usage; - IP address - port/protocol - bandwidth We havcusco cisco 4500. Our ISP router is 3400 metro router (fibre to Ethernet me

  • Printer regonizes Black/white page as color page

    When we print a Word document to a PDF file with the Acrobat printer, pages that contain only Black/White information but with an image that looks as if it is Black/White, the printer recognizes the page as a color page. When we print this page with

  • Difficulties writing SMS in Portuguese

    Good afternoon, I do not find these special caracters, neede to write in Portuguese, when I want to type SMSs: â - á - ã - Á - Ã ê ì õ ô ó ú. If I want to write e-mails, I have no problems at all. Is there any solution for this case? Best thanks. vto

  • Need to change smart form "J_1IEWT_CERT"

    Dear Specialists,   In smart form there are the sentence " Son/Daughter". My customer request to set line for strike out to "Daugher". However, as long as I know, there are no functions in smart forms to set line for strke out. Can someone tell me ho