WebSphere Enterprise Service Bus, Version 6.2.0 Operating Systems: AIX, HP-UX, i5/OS, Linux, Solaris, Windows


How do I work with mixed content?

For mixed content, Sequence has a specific API for adding text: addText(...).

All other APIs work equally with text as they do with Properties. The getProperty(int) API will return null for mixed content text data. The following example of mixed content code can be used to print all the mixed content text from a DataObject:

	DataObject mixedContent = ...
	Sequence seq = mixedContent.getSequence();

	for (int i=0; i < seq.size(); i++)
	{
	    Property prop = seq.getProperty(i);
	    Object value = seq.getValue(i);

	    if (prop == null)
	    {
	        System.out.println("Found mixed content text: "+value);
	    }
	    else
	    {
	        System.out.println("Found Property "+prop.getName()+": "+value);
	    }
	}

concept Concept topic

Terms of use | Feedback


Timestamp icon Last updated: 21 June 2010


http://publib.boulder.ibm.com/infocenter/dmndhelp/v6r2mx/topic//com.ibm.websphere.wesb620.doc/doc/cbo_howmixedcontent.html
Copyright IBM Corporation 2005, 2010. All Rights Reserved.
This information center is powered by Eclipse technology (http://www.eclipse.org).