strip namespaces
Monday, 23 June 2014 · 2 messages · last reply 24 Jun 2014
DS
Daum, Simon23 Jun 2014 23:20 #
Hi there,
is there possibility to strip xml namespaces during input via the c# client api. In the GUI there is a checkbox "strip namespaces" in the "new database" panel. I want to use this in a command like this:
session.Execute(@"create db xObermayer E:\Dev\BaseX\04_Obermeyer.xml");
so I dont have to use the namespace stuff like in this query:
var result = session.Execute("XQUERY declare namespace exp=\"urn:oid:1.0.10303.28.2.1.1\" ; declare namespace" + " doc=\"urn:oid:1.0.10303.28.2.1.3\"; declare namespace ifc=\"http://www.iai-tech.org/ifcXML/IFC2x2/FINAL\";" + " for $x in /doc:iso_10303_28/*/ifc:IfcRelContainedInSpatialStructure return $x");
Regards
Simon
- - - - - - - - -
Dipl.-Ing. Simon Daum
Lehrstuhl für Computergestützte Modellierung und Simulation
Technische Universität München
Arcisstraße 21
D-80290 München
Tel: +49 89 289 25065
Fax: +49 89 289 25051
Web: www.cms.bv.tum.de<http://www.cms.bv.tum.de>
- - - - - - - - -
FE
Fabrice Etanchaud24 Jun 2014 11:42 #
Dear Simon,
You could simply execute the "set stripns true" command before the "create db" one.
Best regards,
Fabrice Etanchaud
Questel/Orbit
Quoted text · Daum, Simon · 24 lines
De : basex-talk-bounces at mailman.uni-konstanz.de [mailto:basex-talk-bounces at mailman.uni-konstanz.de] De la part de Daum, Simon Envoyé : lundi 23 juin 2014 23:20 À : basex-talk at mailman.uni-konstanz.de Objet : [basex-talk] strip namespaces Hi there, is there possibility to strip xml namespaces during input via the c# client api. In the GUI there is a checkbox "strip namespaces" in the "new database" panel. I want to use this in a command like this: session.Execute(@"create db xObermayer E:\Dev\BaseX\04_Obermeyer.xml"); so I dont have to use the namespace stuff like in this query: var result = session.Execute("XQUERY declare namespace exp=\"urn:oid:1.0.10303.28.2.1.1\" ; declare namespace" + " doc=\"urn:oid:1.0.10303.28.2.1.3\"; declare namespace ifc=\"http://www.iai-tech.org/ifcXML/IFC2x2/FINAL\<http://www.iai-tech.org/ifcXML/IFC2x2/FINAL/>";" + " for $x in /doc:iso_10303_28/*/ifc:IfcRelContainedInSpatialStructure return $x"); Regards Simon - - - - - - - - - Dipl.-Ing. Simon Daum Lehrstuhl für Computergestützte Modellierung und Simulation Technische Universität München Arcisstraße 21 D-80290 München Tel: +49 89 289 25065 Fax: +49 89 289 25051 Web: www.cms.bv.tum.de<http://www.cms.bv.tum.de> - - - - - - - - -
Written for BaseX 7.8. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery