65 c1.
set(
"cp1",
"first1");
66 c1.
set(
"cp2",
"second1");
67 c2.
set(
"cp3",
"first2");
68 c2.
set(
"cp4",
"second2");
69 wrotepl1.
set(
"FirstSublist",c1);
70 wrotepl1.
set(
"SecondSublist",c2);
74 std::ostringstream ss;
76 xmlstring1 = ss.str();
77 out <<
"*** String 1" << endl;
78 out << xmlstring1 << endl;
87 c1.
set(
"cp2",
"second1");
88 c1.
set(
"cp1",
"first1");
89 c2.
set(
"cp4",
"second2");
90 c2.
set(
"cp3",
"first2");
91 wrotepl2.
set(
"SecondSublist",c2);
92 wrotepl2.
set(
"FirstSublist",c1);
96 std::ostringstream ss;
98 xmlstring2 = ss.str();
99 out <<
"*** String 2" << endl;
100 out << xmlstring2 << endl;
139 c1.
set(
"A",
"first1");
140 c1.
set(
"Z",
"second1");
141 c2.
set(
"Z",
"first2");
142 c2.
set(
"A",
"second2");
143 plGold.
set(
"9FirstSublist",c1);
144 plGold.
set(
"1SecondSublist",c2);
148 "<ParameterList name=\"ParentList\">\n"
149 " <ParameterList name=\"9FirstSublist\">\n"
150 " <Parameter name=\"A\" type=\"string\" value=\"first1\"/>\n"
151 " <Parameter name=\"Z\" type=\"string\" value=\"second1\"/>\n"
152 " </ParameterList>\n"
153 " <ParameterList name=\"1SecondSublist\">\n"
154 " <Parameter name=\"Z\" type=\"string\" value=\"first2\"/>\n"
155 " <Parameter name=\"A\" type=\"string\" value=\"second2\"/>\n"
156 " </ParameterList>\n"
157 "</ParameterList>\n");
Writes an XML object to a parameter list.
XMLObject toXML(const ParameterList &p, RCP< const DependencySheet > depSheet=null) const
#define TEST_INEQUALITY(v1, v2)
Assert the inequality of v1 and v2.
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Set a parameter whose value has type T.
#define TEST_EQUALITY(v1, v2)
Assert the equality of v1 and v2.
XMLParser consumes characters from an XMLInputStream object, parsing the XML and using a TreeBuilding...
TEUCHOS_UNIT_TEST(ConstNonconstObjectContainer, create)
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
Writes a ParameterList to an XML object.
RCP< ParameterList > toParameterList(const XMLObject &xml, RCP< DependencySheet > depSheet) const
A list of parameters of arbitrary type.
Writes an XML object to a parameter list.
A class providing a simple XML parser. Methods can be overloaded to exploit external XML parsing libr...
Writes a ParameterList to an XML object.